* Fix Get/Set being enumerable fixes #3610 * fix tests Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
50 lines
967 B
TypeScript
50 lines
967 B
TypeScript
//// [accessorsEmit.ts]
|
|
class Result { }
|
|
|
|
class Test {
|
|
get Property(): Result {
|
|
var x = 1;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
class Test2 {
|
|
get Property() {
|
|
var x = 1;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
//// [accessorsEmit.js]
|
|
var Result = /** @class */ (function () {
|
|
function Result() {
|
|
}
|
|
return Result;
|
|
}());
|
|
var Test = /** @class */ (function () {
|
|
function Test() {
|
|
}
|
|
Object.defineProperty(Test.prototype, "Property", {
|
|
get: function () {
|
|
var x = 1;
|
|
return null;
|
|
},
|
|
enumerable: false,
|
|
configurable: true
|
|
});
|
|
return Test;
|
|
}());
|
|
var Test2 = /** @class */ (function () {
|
|
function Test2() {
|
|
}
|
|
Object.defineProperty(Test2.prototype, "Property", {
|
|
get: function () {
|
|
var x = 1;
|
|
return null;
|
|
},
|
|
enumerable: false,
|
|
configurable: true
|
|
});
|
|
return Test2;
|
|
}());
|