2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/infinitelyExpandingTypes5.ts ===
|
|
|
|
interface Query<T> {
|
|
|
|
>Query : Query<T>
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
foo(x: T): Query<T[]>;
|
|
|
|
>foo : (x: T) => Query<T[]>
|
|
|
|
>x : T
|
|
|
|
>T : T
|
2014-08-19 04:56:03 +02:00
|
|
|
>Query : Query<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>T : T
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Enumerator<T> {
|
|
|
|
>Enumerator : Enumerator<T>
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
(action: (item: T, index: number) => boolean): boolean;
|
|
|
|
>action : (item: T, index: number) => boolean
|
|
|
|
>item : T
|
|
|
|
>T : T
|
|
|
|
>index : number
|
|
|
|
}
|
|
|
|
|
|
|
|
function from<T>(array: T[]): Query<T>;
|
|
|
|
>from : { <T>(array: T[]): Query<T>; <T>(enumerator: Enumerator<T>): Query<T>; }
|
|
|
|
>T : T
|
|
|
|
>array : T[]
|
|
|
|
>T : T
|
2014-08-19 04:56:03 +02:00
|
|
|
>Query : Query<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>T : T
|
|
|
|
|
|
|
|
function from<T>(enumerator: Enumerator<T>): Query<T>;
|
|
|
|
>from : { <T>(array: T[]): Query<T>; <T>(enumerator: Enumerator<T>): Query<T>; }
|
|
|
|
>T : T
|
|
|
|
>enumerator : Enumerator<T>
|
2014-08-19 04:56:03 +02:00
|
|
|
>Enumerator : Enumerator<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>T : T
|
2014-08-19 04:56:03 +02:00
|
|
|
>Query : Query<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>T : T
|
|
|
|
|
|
|
|
function from(arg: any): any {
|
|
|
|
>from : { <T>(array: T[]): Query<T>; <T>(enumerator: Enumerator<T>): Query<T>; }
|
|
|
|
>arg : any
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
>undefined : undefined
|
|
|
|
}
|
|
|
|
|