2015-02-03 00:15:54 +01:00
|
|
|
//// [getAndSetAsMemberNames.ts]
|
|
|
|
class C1 {
|
|
|
|
set: boolean;
|
|
|
|
get = 1;
|
|
|
|
}
|
|
|
|
class C2 {
|
|
|
|
set;
|
|
|
|
}
|
|
|
|
class C3 {
|
|
|
|
set (x) {
|
|
|
|
return x + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
class C4 {
|
|
|
|
get: boolean = true;
|
|
|
|
}
|
|
|
|
class C5 {
|
|
|
|
public set: () => boolean = function () { return true; };
|
|
|
|
get (): boolean { return true; }
|
|
|
|
set t(x) { }
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//// [getAndSetAsMemberNames.js]
|
|
|
|
var C1 = (function () {
|
|
|
|
function C1() {
|
|
|
|
this.get = 1;
|
|
|
|
}
|
|
|
|
return C1;
|
|
|
|
})();
|
|
|
|
var C2 = (function () {
|
|
|
|
function C2() {
|
|
|
|
}
|
|
|
|
return C2;
|
|
|
|
})();
|
|
|
|
var C3 = (function () {
|
|
|
|
function C3() {
|
|
|
|
}
|
|
|
|
C3.prototype.set = function (x) {
|
|
|
|
return x + 1;
|
|
|
|
};
|
|
|
|
return C3;
|
|
|
|
})();
|
|
|
|
var C4 = (function () {
|
|
|
|
function C4() {
|
|
|
|
this.get = true;
|
|
|
|
}
|
|
|
|
return C4;
|
|
|
|
})();
|
|
|
|
var C5 = (function () {
|
|
|
|
function C5() {
|
2015-02-07 05:03:24 +01:00
|
|
|
this.set = function () { return true; };
|
2015-02-03 00:15:54 +01:00
|
|
|
}
|
2015-02-07 05:03:24 +01:00
|
|
|
C5.prototype.get = function () { return true; };
|
2015-02-03 00:15:54 +01:00
|
|
|
Object.defineProperty(C5.prototype, "t", {
|
2015-02-07 03:45:09 +01:00
|
|
|
set: function (x) { },
|
2015-02-03 00:15:54 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
return C5;
|
|
|
|
})();
|