TypeScript/tests/baselines/reference/thisInStaticMethod1.types

25 lines
363 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/thisInStaticMethod1.ts ===
class foo {
>foo : foo
2014-08-15 23:33:16 +02:00
static x = 3;
>x : number
2015-04-13 21:36:11 +02:00
>3 : number
2014-08-15 23:33:16 +02:00
static bar() {
>bar : () => number
2014-08-15 23:33:16 +02:00
return this.x;
>this.x : number
>this : typeof foo
>x : number
2014-08-15 23:33:16 +02:00
}
}
var x = foo.bar();
>x : number
2014-08-15 23:33:16 +02:00
>foo.bar() : number
>foo.bar : () => number
>foo : typeof foo
>bar : () => number
2014-08-15 23:33:16 +02:00