TypeScript/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js
2014-07-12 17:30:19 -07:00

23 lines
440 B
JavaScript

//// [thisInArrowFunctionInStaticInitializer1.ts]
function log(a) { }
class Vector {
static foo = () => {
// 'this' should not be available in a static initializer.
log(this);
}
}
//// [thisInArrowFunctionInStaticInitializer1.js]
function log(a) {
}
var Vector = (function () {
function Vector() {
var _this = this;
}
Vector.foo = function () {
log(_this);
};
return Vector;
})();