-
-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
Input code
// This will be an internal class determined by entry point
export class testProperties {
private _salad: number = 0;
public dressing: number = 0;
public get salad(): number { return this._salad; }
public set salad(val: number) { this._salad = val; }
}
var test = new testProperties();
test.salad = 0;
test.dressing = 0;
var totalSalad = test.salad + 1;
var totalDressing = test.dressing + 0;Expected output
(function(exports){
exports.testProperties = void 0;
var testProperties = (function () {
function testProperties() {
this._private__salad = 0;
this._internal_dressing = 0;
}
Object.defineProperty(testProperties.prototype, "_internal_salad", {
get: function () { return this._private__salad; },
set: function (val) { this._private__salad = val; },
enumerable: false,
configurable: true
});
return testProperties;
}());
exports.testProperties = testProperties;
var test = new testProperties();
test._internal_salad = 0;
test._internal_dressing = 0;
var totalSalad = test._internal_salad + 1;
var totalDressing = test._internal_dressing + 0;
})(output);Actual output
(function(exports){
exports.testProperties = void 0;
var testProperties = (function () {
function testProperties() {
this._private__salad = 0;
this._internal_dressing = 0;
}
Object.defineProperty(testProperties.prototype, "salad", {
get: function () { return this._private__salad; },
set: function (val) { this._private__salad = val; },
enumerable: false,
configurable: true
});
return testProperties;
}());
exports.testProperties = testProperties;
var test = new testProperties();
test._internal_salad = 0;
test._internal_dressing = 0;
var totalSalad = test._internal_salad + 1;
var totalDressing = test._internal_dressing + 0;
})(output);Additional context
The "salad" argument of Object.defineProperty was not renamed to "_internal_salad"
timocov
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working