30 lines
571 B
Text
30 lines
571 B
Text
=== tests/cases/compiler/genericFunctions3.ts ===
|
|
interface Query<T> {
|
|
>Query : Query<T>
|
|
>T : T
|
|
|
|
foo(x: string): Query<T[]>;
|
|
>foo : (x: string) => Query<T[]>
|
|
>x : string
|
|
>Query : Query<T>
|
|
>T : T
|
|
}
|
|
|
|
function from<T>(arg: boolean): Query<T>; // was Error: Overload signature is not compatible with function definition.
|
|
>from : typeof from
|
|
>T : T
|
|
>arg : boolean
|
|
>Query : Query<T>
|
|
>T : T
|
|
|
|
function from<T>(arg: any): Query<T> {
|
|
>from : typeof from
|
|
>T : T
|
|
>arg : any
|
|
>Query : Query<T>
|
|
>T : T
|
|
|
|
return undefined;
|
|
>undefined : undefined
|
|
}
|
|
|