TypeScript/tests/baselines/reference/selfRef.js
2015-12-08 17:51:10 -08:00

40 lines
747 B
TypeScript

//// [selfRef.ts]
module M
{
export class Test
{
private name = "hello";
public setName = function(value: string): void {
(function () {
name=value;
})();
}
public getName = function(): string {
return name;
}
}
}
//// [selfRef.js]
var M;
(function (M) {
var Test = (function () {
function Test() {
this.name = "hello";
this.setName = function (value) {
(function () {
name = value;
})();
};
this.getName = function () {
return name;
};
}
return Test;
}());
M.Test = Test;
})(M || (M = {}));