Ajay Poshak b1923fd140
Add a check for privateMap's existence (#11571)
Co-authored-by: Ajay Poshak <ajay.poshak@bookmyshow.com>
2020-05-30 22:38:15 +02:00

39 lines
775 B
JavaScript

var _getStatus = new WeakSet();
class Foo {
constructor(status) {
_getStatus.add(this);
this.status = status;
}
getCurrentStatus() {
return babelHelpers.classPrivateMethodGet(this, _getStatus, _getStatus2).call(this);
}
setCurrentStatus(newStatus) {
this.status = newStatus;
}
getFakeStatus(fakeStatus) {
var fakeGetStatus = babelHelpers.classPrivateMethodGet(this, _getStatus, _getStatus2);
return function () {
return fakeGetStatus.call({
status: fakeStatus
});
};
}
getFakeStatusFunc() {
return {
status: 'fake-status',
getFakeStatus: babelHelpers.classPrivateMethodGet(this, _getStatus, _getStatus2)
};
}
}
var _getStatus2 = function _getStatus2() {
return this.status;
};