1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
//// [invalidThisEmitInContextualObjectLiteral.ts]
interface IDef {
p1: (e:string) => void;
p2: () => (n: number) => any;
}
class TestController {
public m(def: IDef) { }
public p = this.m({
p1: e => { },
p2: () => { return vvvvvvvvv => this; },
});
}
//// [invalidThisEmitInContextualObjectLiteral.js]
var TestController = /** @class */ (function () {
function TestController() {
var _this = this;
this.p = this.m({
p1: function (e) { },
p2: function () { return function (vvvvvvvvv) { return _this; }; }
});
}
TestController.prototype.m = function (def) { };
return TestController;
}());
|