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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
//// [autoLift2.ts]
class A
{
constructor() {
this.foo: any;
this.bar: any;
}
baz() {
this.foo = "foo";
this.bar = "bar";
[1, 2].forEach((p) => this.foo);
[1, 2].forEach((p) => this.bar);
}
}
var a = new A();
a.baz();
//// [autoLift2.js]
var A = /** @class */ (function () {
function A() {
this.foo;
any;
this.bar;
any;
}
A.prototype.baz = function () {
var _this = this;
this.foo = "foo";
this.bar = "bar";
[1, 2].forEach(function (p) { return _this.foo; });
[1, 2].forEach(function (p) { return _this.bar; });
};
return A;
}());
var a = new A();
a.baz();
|