2015-02-03 00:15:54 +01:00
|
|
|
//// [getAndSetNotIdenticalType.ts]
|
|
|
|
class C {
|
|
|
|
get x(): number {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
set x(v: string) { }
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [getAndSetNotIdenticalType.js]
|
|
|
|
var C = (function () {
|
|
|
|
function C() {
|
|
|
|
}
|
|
|
|
Object.defineProperty(C.prototype, "x", {
|
|
|
|
get: function () {
|
|
|
|
return 1;
|
|
|
|
},
|
2015-02-07 03:45:09 +01:00
|
|
|
set: function (v) { },
|
2015-02-03 00:15:54 +01:00
|
|
|
enumerable: true,
|
|
|
|
configurable: true
|
|
|
|
});
|
|
|
|
return C;
|
|
|
|
})();
|