TypeScript/tests/cases/compiler/genericFunctions3.ts

9 lines
247 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
interface Query<T> {
foo(x: string): Query<T[]>;
}
function from<T>(arg: boolean): Query<T>; // was Error: Overload signature is not compatible with function definition.
function from<T>(arg: any): Query<T> {
return undefined;
}