TypeScript/tests/baselines/reference/recursiveTypes1.errors.txt
2014-09-12 13:35:07 -07:00

22 lines
978 B
Plaintext

tests/cases/compiler/recursiveTypes1.ts(1,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
tests/cases/compiler/recursiveTypes1.ts(6,18): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
==== tests/cases/compiler/recursiveTypes1.ts (2 errors) ====
interface Entity<T extends Entity<T>> {
~~~~~~~~~~~~~~~~~~~
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
X: T;
Y: T;
}
interface Person<U extends Person<U>> extends Entity<U> {
~~~~~~~~~~~~~~~~~~~
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
n: number;
}
interface Customer extends Person<Customer> {
s: string;
}