11 lines
223 B
TypeScript
11 lines
223 B
TypeScript
interface List<T> {
|
|
data: T;
|
|
next: List<T>;
|
|
owner: List<List<T>>; // Error, recursive reference with wrapped T
|
|
}
|
|
|
|
interface List2<T> {
|
|
data: T;
|
|
next: List2<T>;
|
|
owner: List2<List2<string>>; // Ok
|
|
}
|