37 lines
533 B
Text
37 lines
533 B
Text
=== tests/cases/compiler/recursiveTypes1.ts ===
|
|
interface Entity<T extends Entity<T>> {
|
|
>Entity : Entity<T>
|
|
>T : T
|
|
>Entity : Entity<T>
|
|
>T : T
|
|
|
|
X: T;
|
|
>X : T
|
|
>T : T
|
|
|
|
Y: T;
|
|
>Y : T
|
|
>T : T
|
|
}
|
|
|
|
interface Person<U extends Person<U>> extends Entity<U> {
|
|
>Person : Person<U>
|
|
>U : U
|
|
>Person : Person<U>
|
|
>U : U
|
|
>Entity : Entity<T>
|
|
>U : U
|
|
|
|
n: number;
|
|
>n : number
|
|
}
|
|
|
|
interface Customer extends Person<Customer> {
|
|
>Customer : Customer
|
|
>Person : Person<U>
|
|
>Customer : Customer
|
|
|
|
s: string;
|
|
>s : string
|
|
}
|
|
|