TypeScript/tests/cases/compiler/functionOverloadsRecursiveGenericReturnType.ts

14 lines
241 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
class B<V>{
private id: V;
}
class A<U>{
GetEnumerator: () => B<U>;
}
function Choice<T>(args: T[]): A<T>;
function Choice<T>(...v_args: T[]): A<T>;
function Choice<T>(...v_args: any[]): A<T>{
return new A<T>();
}