Tim McClure e8de6fa5d4 Private Class Methods Stage 3: Private Accessors (#9101)
* Add accessor loose support

* Add private accessors spec support

* Fix private dupe name check

* Changes from code review

* Add duplicated names tests

* Add get/set-only tests

* Move accessors tests

* Split out updates tests

* Add helper change tests

* Update test output

* Update test options
2019-01-21 22:05:37 +01:00

22 lines
679 B
JavaScript

var Cl = function Cl() {
"use strict";
babelHelpers.classCallCheck(this, Cl);
Object.defineProperty(this, _privateFieldValue, {
set: _set_privateFieldValue
});
Object.defineProperty(this, _privateField, {
writable: true,
value: 0
});
this.publicField = babelHelpers.classPrivateFieldLooseBase(this, _privateFieldValue)[_privateFieldValue];
};
var _privateField = babelHelpers.classPrivateFieldLooseKey("privateField");
var _privateFieldValue = babelHelpers.classPrivateFieldLooseKey("privateFieldValue");
var _set_privateFieldValue = function (newValue) {
babelHelpers.classPrivateFieldLooseBase(this, _privateField)[_privateField] = newValue;
};