2014-07-13 01:04:16 +02:00
|
|
|
//// [nestedSelf.ts]
|
|
|
|
module M {
|
|
|
|
export class C {
|
|
|
|
public n = 42;
|
|
|
|
public foo() { [1,2,3].map((x) => { return this.n * x; })}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//// [nestedSelf.js]
|
|
|
|
var M;
|
|
|
|
(function (M) {
|
|
|
|
var C = (function () {
|
|
|
|
function C() {
|
|
|
|
this.n = 42;
|
|
|
|
}
|
|
|
|
C.prototype.foo = function () {
|
|
|
|
var _this = this;
|
2015-02-07 05:03:24 +01:00
|
|
|
[1, 2, 3].map(function (x) { return _this.n * x; });
|
2014-07-13 01:04:16 +02:00
|
|
|
};
|
|
|
|
return C;
|
|
|
|
})();
|
|
|
|
M.C = C;
|
|
|
|
})(M || (M = {}));
|