mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
33 lines
1.3 KiB
Plaintext
33 lines
1.3 KiB
Plaintext
//// [tests/cases/compiler/genericFunctions3.ts] ////
|
|
|
|
=== 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(Query.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)
|
|
}
|
|
|