35 lines
514 B
Text
35 lines
514 B
Text
=== tests/cases/compiler/transitiveTypeArgumentInference1.ts ===
|
|
interface I1<T, U> {
|
|
>I1 : I1<T, U>
|
|
>T : T
|
|
>U : U
|
|
|
|
m(value: T): U;
|
|
>m : (value: T) => U
|
|
>value : T
|
|
>T : T
|
|
>U : U
|
|
}
|
|
|
|
var i: I1<boolean, string> = null;
|
|
>i : I1<boolean, string>
|
|
>I1 : I1<T, U>
|
|
>null : null
|
|
|
|
class C<T> {
|
|
>C : C<T>
|
|
>T : T
|
|
|
|
constructor(p: I1<boolean, T>) {
|
|
>p : I1<boolean, T>
|
|
>I1 : I1<T, U>
|
|
>T : T
|
|
}
|
|
}
|
|
|
|
var c = new C(i);
|
|
>c : C<string>
|
|
>new C(i) : C<string>
|
|
>C : typeof C
|
|
>i : I1<boolean, string>
|
|
|