30 lines
1.2 KiB
Text
30 lines
1.2 KiB
Text
=== tests/cases/compiler/genericFunctions3.ts ===
|
|
interface Query<T> {
|
|
>Query : Symbol(Query, Decl(genericFunctions3.ts, 0, 0))
|
|
>T : Symbol(T, Decl(genericFunctions3.ts, 0, 16))
|
|
|
|
foo(x: string): Query<T[]>;
|
|
>foo : Symbol(foo, Decl(genericFunctions3.ts, 0, 20))
|
|
>x : Symbol(x, Decl(genericFunctions3.ts, 1, 8))
|
|
>Query : Symbol(Query, Decl(genericFunctions3.ts, 0, 0))
|
|
>T : Symbol(T, Decl(genericFunctions3.ts, 0, 16))
|
|
}
|
|
|
|
function from<T>(arg: boolean): Query<T>; // was Error: Overload signature is not compatible with function definition.
|
|
>from : Symbol(from, Decl(genericFunctions3.ts, 2, 1), Decl(genericFunctions3.ts, 4, 41))
|
|
>T : Symbol(T, Decl(genericFunctions3.ts, 4, 14))
|
|
>arg : Symbol(arg, Decl(genericFunctions3.ts, 4, 17))
|
|
>Query : Symbol(Query, Decl(genericFunctions3.ts, 0, 0))
|
|
>T : Symbol(T, Decl(genericFunctions3.ts, 4, 14))
|
|
|
|
function from<T>(arg: any): Query<T> {
|
|
>from : Symbol(from, Decl(genericFunctions3.ts, 2, 1), Decl(genericFunctions3.ts, 4, 41))
|
|
>T : Symbol(T, Decl(genericFunctions3.ts, 5, 14))
|
|
>arg : Symbol(arg, Decl(genericFunctions3.ts, 5, 17))
|
|
>Query : Symbol(Query, Decl(genericFunctions3.ts, 0, 0))
|
|
>T : Symbol(T, Decl(genericFunctions3.ts, 5, 14))
|
|
|
|
return undefined;
|
|
>undefined : Symbol(undefined)
|
|
}
|
|
|