TypeScript/tests/baselines/reference/overloadGenericFunctionWithRestArgs.types

40 lines
599 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/overloadGenericFunctionWithRestArgs.ts ===
class B<V>{
>B : B<V>
>V : V
2014-08-15 23:33:16 +02:00
private id: V;
>id : V
>V : V
2014-08-15 23:33:16 +02:00
}
class A<U>{
>A : A<U>
>U : U
2014-08-15 23:33:16 +02:00
GetEnumerator: () => B<U>;
>GetEnumerator : () => B<U>
>B : B<V>
>U : U
2014-08-15 23:33:16 +02:00
}
function Choice<T>(...v_args: T[]): A<T>;
>Choice : <T>(...v_args: T[]) => A<T>
>T : T
>v_args : T[]
>T : T
>A : A<U>
>T : T
2014-08-15 23:33:16 +02:00
function Choice<T>(...v_args: T[]): A<T> {
>Choice : <T>(...v_args: T[]) => A<T>
>T : T
>v_args : T[]
>T : T
>A : A<U>
>T : T
2014-08-15 23:33:16 +02:00
return new A<T>();
>new A<T>() : A<T>
>A : typeof A
>T : T
2014-08-15 23:33:16 +02:00
}