16 lines
252 B
JavaScript
16 lines
252 B
JavaScript
//// [recursiveTypes1.ts]
|
|
interface Entity<T extends Entity<T>> {
|
|
X: T;
|
|
Y: T;
|
|
}
|
|
|
|
interface Person<U extends Person<U>> extends Entity<U> {
|
|
n: number;
|
|
}
|
|
|
|
interface Customer extends Person<Customer> {
|
|
s: string;
|
|
}
|
|
|
|
|
|
//// [recursiveTypes1.js]
|