38 lines
642 B
Text
38 lines
642 B
Text
=== tests/cases/compiler/classExpressionTest1.ts ===
|
|
function M() {
|
|
>M : () => { t: string; x: number; }
|
|
|
|
class C<X> {
|
|
>C : C<X>
|
|
>X : X
|
|
|
|
f<T>() {
|
|
>f : <T>() => { t: T; x: X; }
|
|
>T : T
|
|
|
|
var t: T;
|
|
>t : T
|
|
>T : T
|
|
|
|
var x: X;
|
|
>x : X
|
|
>X : X
|
|
|
|
return { t, x };
|
|
>{ t, x } : { t: T; x: X; }
|
|
>t : T
|
|
>x : X
|
|
}
|
|
}
|
|
|
|
var v = new C<number>();
|
|
>v : C<number>
|
|
>new C<number>() : C<number>
|
|
>C : typeof C
|
|
|
|
return v.f<string>();
|
|
>v.f<string>() : { t: string; x: number; }
|
|
>v.f : <T>() => { t: T; x: number; }
|
|
>v : C<number>
|
|
>f : <T>() => { t: T; x: number; }
|
|
}
|