TypeScript/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js
2015-02-06 18:45:09 -08:00

23 lines
507 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 () {
// 'this' should not be available in a static initializer.
log(_this);
};
return Vector;
})();