20 lines
No EOL
321 B
TypeScript
20 lines
No EOL
321 B
TypeScript
class Foo {
|
|
|
|
x = this;
|
|
|
|
static y = this;
|
|
|
|
bar() {
|
|
|
|
this.x; // 'this' is type 'Foo'
|
|
|
|
var f = () => this.x; // 'this' should be type 'Foo' as well
|
|
var p = this.y;
|
|
return this;
|
|
}
|
|
|
|
static bar2() {
|
|
var a = this.y;
|
|
var b = this.x;
|
|
}
|
|
} |