TypeScript/tests/baselines/reference/thisInStaticMethod1.js

21 lines
327 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [thisInStaticMethod1.ts]
class foo {
static x = 3;
static bar() {
return this.x;
}
}
var x = foo.bar();
//// [thisInStaticMethod1.js]
var foo = (function () {
function foo() {
}
foo.bar = function () {
return this.x;
};
foo.x = 3;
return foo;
})();
var x = foo.bar();