24 lines
350 B
Text
24 lines
350 B
Text
|
=== tests/cases/compiler/thisInStaticMethod1.ts ===
|
||
|
class foo {
|
||
|
>foo : foo
|
||
|
|
||
|
static x = 3;
|
||
|
>x : number
|
||
|
|
||
|
static bar() {
|
||
|
>bar : () => number
|
||
|
|
||
|
return this.x;
|
||
|
>this.x : number
|
||
|
>this : typeof foo
|
||
|
>x : number
|
||
|
}
|
||
|
}
|
||
|
var x = foo.bar();
|
||
|
>x : number
|
||
|
>foo.bar() : number
|
||
|
>foo.bar : () => number
|
||
|
>foo : typeof foo
|
||
|
>bar : () => number
|
||
|
|