2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/genericFunctions3.ts ===
|
|
|
|
interface Query<T> {
|
2015-04-13 22:54:22 +02:00
|
|
|
>Query : Query<T>, Symbol(Query,Decl(genericFunctions3.ts,0,0))
|
|
|
|
>T : T, Symbol(T,Decl(genericFunctions3.ts,0,16))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo(x: string): Query<T[]>;
|
2015-04-13 22:54:22 +02:00
|
|
|
>foo : (x: string) => Query<T[]>, Symbol(foo,Decl(genericFunctions3.ts,0,20))
|
|
|
|
>x : string, Symbol(x,Decl(genericFunctions3.ts,1,8))
|
|
|
|
>Query : Query<T>, Symbol(Query,Decl(genericFunctions3.ts,0,0))
|
|
|
|
>T : T, Symbol(T,Decl(genericFunctions3.ts,0,16))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function from<T>(arg: boolean): Query<T>; // was Error: Overload signature is not compatible with function definition.
|
2015-04-13 22:54:22 +02:00
|
|
|
>from : <T>(arg: boolean) => Query<T>, Symbol(from,Decl(genericFunctions3.ts,2,1),Decl(genericFunctions3.ts,4,41))
|
|
|
|
>T : T, Symbol(T,Decl(genericFunctions3.ts,4,14))
|
|
|
|
>arg : boolean, Symbol(arg,Decl(genericFunctions3.ts,4,17))
|
|
|
|
>Query : Query<T>, Symbol(Query,Decl(genericFunctions3.ts,0,0))
|
|
|
|
>T : T, Symbol(T,Decl(genericFunctions3.ts,4,14))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
function from<T>(arg: any): Query<T> {
|
2015-04-13 22:54:22 +02:00
|
|
|
>from : <T>(arg: boolean) => Query<T>, Symbol(from,Decl(genericFunctions3.ts,2,1),Decl(genericFunctions3.ts,4,41))
|
|
|
|
>T : T, Symbol(T,Decl(genericFunctions3.ts,5,14))
|
|
|
|
>arg : any, Symbol(arg,Decl(genericFunctions3.ts,5,17))
|
|
|
|
>Query : Query<T>, Symbol(Query,Decl(genericFunctions3.ts,0,0))
|
|
|
|
>T : T, Symbol(T,Decl(genericFunctions3.ts,5,14))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
return undefined;
|
2015-04-13 22:54:22 +02:00
|
|
|
>undefined : undefined, Symbol(undefined)
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|