* Desugar class properties to Object.defineProperty per spec * Define uninitialized static class properties with value=undefined * Make class-properties increased spec compliance opt-in (spec: true)
18 lines
285 B
JavaScript
18 lines
285 B
JavaScript
var foo = "bar";
|
|
|
|
var Foo = function Foo() {
|
|
babelHelpers.classCallCheck(this, Foo);
|
|
|
|
_initialiseProps.call(this);
|
|
|
|
var foo = "foo";
|
|
};
|
|
|
|
var _initialiseProps = function () {
|
|
Object.defineProperty(this, "bar", {
|
|
enumerable: true,
|
|
writable: true,
|
|
value: foo
|
|
});
|
|
};
|