TypeScript/tests/baselines/reference/accessorsEmit.js
Pathurs 5c85febb0c
Fix Get/Set being enumerable (#32264)
* Fix Get/Set being enumerable

fixes #3610

* fix tests

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-02-27 14:08:20 -08:00

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;
}());