Allow extending untranspiled classes (#8656)
This commit is contained in:
@@ -35,6 +35,7 @@ export default function transformClass(
|
||||
|
||||
classId: undefined,
|
||||
classRef: undefined,
|
||||
superFnId: undefined,
|
||||
superName: undefined,
|
||||
superReturns: [],
|
||||
isDerived: false,
|
||||
@@ -257,7 +258,7 @@ export default function transformClass(
|
||||
}
|
||||
|
||||
function wrapSuperCall(bareSuper, superRef, thisRef, body) {
|
||||
let bareSuperNode = bareSuper.node;
|
||||
const bareSuperNode = bareSuper.node;
|
||||
let call;
|
||||
|
||||
if (classState.isLoose) {
|
||||
@@ -284,18 +285,11 @@ export default function transformClass(
|
||||
|
||||
call = t.logicalExpression("||", bareSuperNode, t.thisExpression());
|
||||
} else {
|
||||
bareSuperNode = optimiseCall(
|
||||
t.callExpression(classState.file.addHelper("getPrototypeOf"), [
|
||||
t.cloneNode(classState.classRef),
|
||||
]),
|
||||
call = optimiseCall(
|
||||
t.cloneNode(classState.superFnId),
|
||||
t.thisExpression(),
|
||||
bareSuperNode.arguments,
|
||||
);
|
||||
|
||||
call = t.callExpression(
|
||||
classState.file.addHelper("possibleConstructorReturn"),
|
||||
[t.thisExpression(), bareSuperNode],
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
@@ -544,7 +538,9 @@ export default function transformClass(
|
||||
function pushInheritsToBody() {
|
||||
if (!classState.isDerived || classState.pushedInherits) return;
|
||||
|
||||
setState({ pushedInherits: true });
|
||||
const superFnId = path.scope.generateUidIdentifier("super");
|
||||
|
||||
setState({ pushedInherits: true, superFnId });
|
||||
|
||||
// Unshift to ensure that the constructor inheritance is set up before
|
||||
// any properties can be assigned to the prototype.
|
||||
@@ -557,6 +553,14 @@ export default function transformClass(
|
||||
[t.cloneNode(classState.classRef), t.cloneNode(classState.superName)],
|
||||
),
|
||||
),
|
||||
t.variableDeclaration("var", [
|
||||
t.variableDeclarator(
|
||||
superFnId,
|
||||
t.callExpression(classState.file.addHelper("createSuper"), [
|
||||
t.cloneNode(classState.classRef),
|
||||
]),
|
||||
),
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
|
||||
|
||||
function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
||||
|
||||
function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
||||
|
||||
@@ -17,6 +23,8 @@ var List = /*#__PURE__*/function (_Array) {
|
||||
|
||||
_inheritsLoose(List, _Array);
|
||||
|
||||
var _super = _createSuper(List);
|
||||
|
||||
function List() {
|
||||
return _Array.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
function _createSuper(Derived) { return function () { var Super = babelHelpers.getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
let Array = function Array() {
|
||||
"use strict";
|
||||
|
||||
@@ -9,9 +13,11 @@ let List = /*#__PURE__*/function (_Array) {
|
||||
|
||||
babelHelpers.inherits(List, _Array);
|
||||
|
||||
var _super = _createSuper(List);
|
||||
|
||||
function List() {
|
||||
babelHelpers.classCallCheck(this, List);
|
||||
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(List).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
return List;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
@@ -8,9 +10,9 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
||||
|
||||
function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
|
||||
|
||||
function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
||||
|
||||
function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
||||
|
||||
@@ -23,10 +25,12 @@ var List = /*#__PURE__*/function (_Array) {
|
||||
|
||||
_inherits(List, _Array);
|
||||
|
||||
var _super = _createSuper(List);
|
||||
|
||||
function List() {
|
||||
_classCallCheck(this, List);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(List).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
return List;
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
let Base = /*#__PURE__*/function () {
|
||||
@@ -19,6 +29,8 @@ let Base = /*#__PURE__*/function () {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
@@ -29,6 +39,8 @@ let Base = /*#__PURE__*/function () {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
let Base = function Base() {};
|
||||
@@ -7,6 +17,8 @@ let Base = function Base() {};
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
@@ -22,6 +32,8 @@ let Base = /*#__PURE__*/function () {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
let Base = function Base() {};
|
||||
@@ -9,6 +19,8 @@ Base.prototype.test = 1;
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
@@ -25,6 +35,8 @@ let Base = /*#__PURE__*/function () {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
let Base = function Base() {};
|
||||
@@ -7,6 +17,8 @@ let Base = function Base() {};
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
@@ -22,6 +32,8 @@ let Base = /*#__PURE__*/function () {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
let Base = function Base() {};
|
||||
@@ -25,6 +35,8 @@ const proper = {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
let Base = function Base() {};
|
||||
@@ -25,6 +35,8 @@ const proper = {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
let Base = function Base() {};
|
||||
@@ -13,6 +23,8 @@ Object.defineProperty(Base.prototype, 'test', {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
@@ -27,6 +37,8 @@ let Base = /*#__PURE__*/function () {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
let Base = function Base() {};
|
||||
@@ -7,6 +17,8 @@ let Base = function Base() {};
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
let Base = function Base() {};
|
||||
@@ -13,6 +23,8 @@ let called = false;
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
let Base = function Base() {};
|
||||
@@ -7,6 +17,8 @@ let Base = function Base() {};
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
let Base = function Base() {};
|
||||
@@ -13,6 +23,8 @@ let value = 2;
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
@@ -24,6 +34,8 @@ let Base = /*#__PURE__*/function () {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inheritsLoose(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
return _Base.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
"use strict";
|
||||
|
||||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
@@ -40,10 +44,12 @@ let Base = /*#__PURE__*/function () {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
"use strict";
|
||||
|
||||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
@@ -43,10 +47,12 @@ let Base = /*#__PURE__*/function () {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -4,13 +4,17 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
@@ -27,10 +31,12 @@ let Base = function Base() {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
"use strict";
|
||||
|
||||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
@@ -38,10 +42,12 @@ let Base = /*#__PURE__*/function () {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -4,13 +4,17 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
@@ -29,10 +33,12 @@ Base.prototype.test = 1;
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
"use strict";
|
||||
|
||||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
@@ -39,10 +43,12 @@ let Base = /*#__PURE__*/function () {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -4,13 +4,17 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
@@ -27,10 +31,12 @@ let Base = function Base() {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
"use strict";
|
||||
|
||||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
@@ -38,10 +42,12 @@ let Base = /*#__PURE__*/function () {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -4,10 +4,6 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function set(target, property, value, receiver) { if (typeof Reflect !== "undefined" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }
|
||||
|
||||
function _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }
|
||||
@@ -18,6 +14,14 @@ function _get(target, property, receiver) { if (typeof Reflect !== "undefined" &
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
@@ -51,10 +55,12 @@ const proper = {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -4,10 +4,6 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function set(target, property, value, receiver) { if (typeof Reflect !== "undefined" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }
|
||||
|
||||
function _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }
|
||||
@@ -18,6 +14,14 @@ function _get(target, property, receiver) { if (typeof Reflect !== "undefined" &
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
@@ -51,10 +55,12 @@ const proper = {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -4,10 +4,6 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function set(target, property, value, receiver) { if (typeof Reflect !== "undefined" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }
|
||||
|
||||
function _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }
|
||||
@@ -16,6 +12,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
@@ -37,10 +41,12 @@ Object.defineProperty(Base.prototype, 'test', {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function set(target, property, value, receiver) { if (typeof Reflect !== "undefined" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }
|
||||
|
||||
function _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }
|
||||
@@ -12,6 +8,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
@@ -44,10 +48,12 @@ let Base = /*#__PURE__*/function () {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -4,10 +4,6 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function set(target, property, value, receiver) { if (typeof Reflect !== "undefined" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }
|
||||
|
||||
function _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }
|
||||
@@ -16,6 +12,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
@@ -31,10 +35,12 @@ let Base = function Base() {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -4,10 +4,6 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function set(target, property, value, receiver) { if (typeof Reflect !== "undefined" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }
|
||||
|
||||
function _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }
|
||||
@@ -16,6 +12,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
@@ -31,10 +35,12 @@ let Base = function Base() {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -4,10 +4,6 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function set(target, property, value, receiver) { if (typeof Reflect !== "undefined" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }
|
||||
|
||||
function _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }
|
||||
@@ -16,6 +12,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
@@ -31,10 +35,12 @@ let Base = function Base() {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -4,10 +4,6 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function set(target, property, value, receiver) { if (typeof Reflect !== "undefined" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }
|
||||
|
||||
function _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }
|
||||
@@ -16,6 +12,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
@@ -33,10 +37,12 @@ let value = 2;
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function set(target, property, value, receiver) { if (typeof Reflect !== "undefined" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }
|
||||
|
||||
function _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }
|
||||
@@ -12,6 +8,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
||||
|
||||
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
@@ -44,10 +48,12 @@ let Base = /*#__PURE__*/function () {
|
||||
let Obj = /*#__PURE__*/function (_Base) {
|
||||
_inherits(Obj, _Base);
|
||||
|
||||
var _super = _createSuper(Obj);
|
||||
|
||||
function Obj() {
|
||||
_classCallCheck(this, Obj);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(Obj).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
_createClass(Obj, [{
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
let B = function B() {
|
||||
@@ -11,6 +19,8 @@ let A = /*#__PURE__*/function (_B) {
|
||||
|
||||
_inheritsLoose(A, _B);
|
||||
|
||||
var _super = _createSuper(A);
|
||||
|
||||
function A(track) {
|
||||
var _this;
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ var Test = /*#__PURE__*/function (_Foo) {
|
||||
|
||||
babelHelpers.inheritsLoose(Test, _Foo);
|
||||
|
||||
var _super = babelHelpers.createSuper(Test);
|
||||
|
||||
function Test() {
|
||||
var _Foo$prototype$test;
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ var Test = /*#__PURE__*/function (_Foo) {
|
||||
|
||||
babelHelpers.inheritsLoose(Test, _Foo);
|
||||
|
||||
var _super = babelHelpers.createSuper(Test);
|
||||
|
||||
function Test() {
|
||||
var _this;
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ var Test = /*#__PURE__*/function (_Foo) {
|
||||
|
||||
babelHelpers.inheritsLoose(Test, _Foo);
|
||||
|
||||
var _super = babelHelpers.createSuper(Test);
|
||||
|
||||
function Test() {
|
||||
var _this;
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
babelHelpers.inheritsLoose(Foo, _Bar);
|
||||
|
||||
var _super = babelHelpers.createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ var Child = /*#__PURE__*/function (_Base) {
|
||||
|
||||
babelHelpers.inheritsLoose(Child, _Base);
|
||||
|
||||
var _super = babelHelpers.createSuper(Child);
|
||||
|
||||
function Child() {
|
||||
var _this;
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ var Child = /*#__PURE__*/function (_Base) {
|
||||
|
||||
babelHelpers.inheritsLoose(Child, _Base);
|
||||
|
||||
var _super = babelHelpers.createSuper(Child);
|
||||
|
||||
function Child() {
|
||||
var _this;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"plugins": [
|
||||
"external-helpers",
|
||||
["external-helpers", { "helperVersion": "7.100.0" }],
|
||||
"transform-function-name",
|
||||
["transform-classes", { "loose": true }],
|
||||
["transform-spread", { "loose": true }],
|
||||
|
||||
@@ -3,6 +3,8 @@ var BaseController = /*#__PURE__*/function (_Chaplin$Controller) {
|
||||
|
||||
babelHelpers.inheritsLoose(BaseController, _Chaplin$Controller);
|
||||
|
||||
var _super = babelHelpers.createSuper(BaseController);
|
||||
|
||||
function BaseController() {
|
||||
return _Chaplin$Controller.apply(this, arguments) || this;
|
||||
}
|
||||
@@ -15,6 +17,8 @@ var BaseController2 = /*#__PURE__*/function (_Chaplin$Controller$A) {
|
||||
|
||||
babelHelpers.inheritsLoose(BaseController2, _Chaplin$Controller$A);
|
||||
|
||||
var _super2 = babelHelpers.createSuper(BaseController2);
|
||||
|
||||
function BaseController2() {
|
||||
return _Chaplin$Controller$A.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ var Test = /*#__PURE__*/function (_Foo) {
|
||||
|
||||
babelHelpers.inheritsLoose(Test, _Foo);
|
||||
|
||||
var _super = babelHelpers.createSuper(Test);
|
||||
|
||||
function Test() {
|
||||
return _Foo.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
@@ -11,15 +11,21 @@ var _events = require("events");
|
||||
|
||||
var _binarySerializer = babelHelpers.interopRequireDefault(require("./helpers/binary-serializer"));
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = babelHelpers.getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
// import ...
|
||||
var Connection = /*#__PURE__*/function (_EventEmitter) {
|
||||
babelHelpers.inherits(Connection, _EventEmitter);
|
||||
|
||||
var _super = _createSuper(Connection);
|
||||
|
||||
function Connection(endpoint, joinKey, joinData, roomId) {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, Connection);
|
||||
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Connection).call(this));
|
||||
_this = _super.call(this);
|
||||
_this.isConnected = false;
|
||||
_this.roomId = roomId; // ...
|
||||
|
||||
|
||||
@@ -7,12 +7,18 @@ exports["default"] = void 0;
|
||||
|
||||
var _BaseFoo2 = babelHelpers.interopRequireDefault(require("./BaseFoo"));
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = babelHelpers.getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
var SubFoo = /*#__PURE__*/function (_BaseFoo) {
|
||||
babelHelpers.inherits(SubFoo, _BaseFoo);
|
||||
|
||||
var _super = _createSuper(SubFoo);
|
||||
|
||||
function SubFoo() {
|
||||
babelHelpers.classCallCheck(this, SubFoo);
|
||||
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(SubFoo).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
babelHelpers.createClass(SubFoo, null, [{
|
||||
|
||||
@@ -7,12 +7,18 @@ exports["default"] = void 0;
|
||||
|
||||
var _react = babelHelpers.interopRequireDefault(require("react"));
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = babelHelpers.getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
var RandomComponent = /*#__PURE__*/function (_Component) {
|
||||
babelHelpers.inherits(RandomComponent, _Component);
|
||||
|
||||
var _super = _createSuper(RandomComponent);
|
||||
|
||||
function RandomComponent() {
|
||||
babelHelpers.classCallCheck(this, RandomComponent);
|
||||
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(RandomComponent).call(this));
|
||||
return _super.call(this);
|
||||
}
|
||||
|
||||
babelHelpers.createClass(RandomComponent, [{
|
||||
|
||||
@@ -5,6 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
||||
});
|
||||
exports["default"] = void 0;
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = babelHelpers.getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
var b = function b() {
|
||||
babelHelpers.classCallCheck(this, b);
|
||||
};
|
||||
@@ -12,11 +16,13 @@ var b = function b() {
|
||||
var a1 = /*#__PURE__*/function (_b) {
|
||||
babelHelpers.inherits(a1, _b);
|
||||
|
||||
var _super = _createSuper(a1);
|
||||
|
||||
function a1() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, a1);
|
||||
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(a1).call(this));
|
||||
_this = _super.call(this);
|
||||
|
||||
_this.x = function () {
|
||||
return babelHelpers.assertThisInitialized(_this);
|
||||
@@ -31,11 +37,13 @@ var a1 = /*#__PURE__*/function (_b) {
|
||||
var a2 = /*#__PURE__*/function (_b2) {
|
||||
babelHelpers.inherits(a2, _b2);
|
||||
|
||||
var _super2 = _createSuper(a2);
|
||||
|
||||
function a2() {
|
||||
var _this2;
|
||||
|
||||
babelHelpers.classCallCheck(this, a2);
|
||||
_this2 = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(a2).call(this));
|
||||
_this2 = _super2.call(this);
|
||||
|
||||
_this2.x = function () {
|
||||
return babelHelpers.assertThisInitialized(_this2);
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
function _createSuper(Derived) { return function () { var Super = babelHelpers.getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
var Point = /*#__PURE__*/function () {
|
||||
"use strict";
|
||||
|
||||
@@ -19,11 +23,13 @@ var ColorPoint = /*#__PURE__*/function (_Point) {
|
||||
|
||||
babelHelpers.inherits(ColorPoint, _Point);
|
||||
|
||||
var _super = _createSuper(ColorPoint);
|
||||
|
||||
function ColorPoint() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, ColorPoint);
|
||||
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(ColorPoint).call(this));
|
||||
_this = _super.call(this);
|
||||
_this.x = 2;
|
||||
babelHelpers.set(babelHelpers.getPrototypeOf(ColorPoint.prototype), "x", 3, babelHelpers.assertThisInitialized(_this), true);
|
||||
expect(_this.x).toBe(3); // A
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
function _createSuper(Derived) { return function () { var Super = babelHelpers.getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
var A = /*#__PURE__*/function (_B) {
|
||||
"use strict";
|
||||
|
||||
babelHelpers.inherits(A, _B);
|
||||
|
||||
var _super = _createSuper(A);
|
||||
|
||||
function A() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, A);
|
||||
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(A).call(this));
|
||||
_this = _super.call(this);
|
||||
|
||||
_this.arrow1 = function (x) {
|
||||
return x;
|
||||
|
||||
@@ -1,17 +1,26 @@
|
||||
// Pretend that `Reflect.construct` isn't supported.
|
||||
this.Reflect = undefined;
|
||||
const oldReflect = this.Reflect;
|
||||
const oldHTMLElement = this.HTMLElement;
|
||||
|
||||
this.HTMLElement = function() {
|
||||
// Here, `this.HTMLElement` is this function, not the original HTMLElement
|
||||
// constructor. `this.constructor` should be this function too, but isn't.
|
||||
constructor = this.constructor;
|
||||
};
|
||||
try {
|
||||
// Pretend that `Reflect.construct` isn't supported.
|
||||
this.Reflect = undefined;
|
||||
|
||||
var constructor;
|
||||
this.HTMLElement = function() {
|
||||
// Here, `this.HTMLElement` is this function, not the original HTMLElement
|
||||
// constructor. `this.constructor` should be this function too, but isn't.
|
||||
constructor = this.constructor;
|
||||
};
|
||||
|
||||
class CustomElement extends HTMLElement {};
|
||||
new CustomElement();
|
||||
var constructor;
|
||||
|
||||
expect(constructor).toBe(CustomElement);
|
||||
class CustomElement extends HTMLElement {};
|
||||
new CustomElement();
|
||||
|
||||
expect(constructor).toBe(CustomElement);
|
||||
} finally {
|
||||
// Restore original env
|
||||
this.Reflect = oldReflect;
|
||||
this.HTMLElement = oldHTMLElement;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,17 +1,26 @@
|
||||
// Pretend that `Reflect.construct` isn't supported.
|
||||
this.Reflect = undefined;
|
||||
const oldReflect = this.Reflect;
|
||||
const oldHTMLElement = this.HTMLElement;
|
||||
|
||||
this.HTMLElement = function() {
|
||||
// Here, `this.HTMLElement` is this function, not the original HTMLElement
|
||||
// constructor. `this.constructor` should be this function too, but isn't.
|
||||
constructor = this.constructor;
|
||||
};
|
||||
try {
|
||||
// Pretend that `Reflect.construct` isn't supported.
|
||||
this.Reflect = undefined;
|
||||
|
||||
var constructor;
|
||||
this.HTMLElement = function() {
|
||||
// Here, `this.HTMLElement` is this function, not the original HTMLElement
|
||||
// constructor. `this.constructor` should be this function too, but isn't.
|
||||
constructor = this.constructor;
|
||||
};
|
||||
|
||||
class CustomElement extends HTMLElement {};
|
||||
new CustomElement();
|
||||
var constructor;
|
||||
|
||||
expect(constructor).toBe(CustomElement);
|
||||
class CustomElement extends HTMLElement {};
|
||||
new CustomElement();
|
||||
|
||||
expect(constructor).toBe(CustomElement);
|
||||
} finally {
|
||||
// Restore original env
|
||||
this.Reflect = oldReflect;
|
||||
this.HTMLElement = oldHTMLElement;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,27 +1,42 @@
|
||||
// Pretend that `Reflect.construct` isn't supported.
|
||||
this.Reflect = undefined;
|
||||
function _createSuper(Derived) { return function () { var Super = babelHelpers.getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
this.HTMLElement = function () {
|
||||
// Here, `this.HTMLElement` is this function, not the original HTMLElement
|
||||
// constructor. `this.constructor` should be this function too, but isn't.
|
||||
constructor = this.constructor;
|
||||
};
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
var constructor;
|
||||
var oldReflect = this.Reflect;
|
||||
var oldHTMLElement = this.HTMLElement;
|
||||
|
||||
var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
||||
"use strict";
|
||||
try {
|
||||
// Pretend that `Reflect.construct` isn't supported.
|
||||
this.Reflect = undefined;
|
||||
|
||||
babelHelpers.inherits(CustomElement, _HTMLElement);
|
||||
this.HTMLElement = function () {
|
||||
// Here, `this.HTMLElement` is this function, not the original HTMLElement
|
||||
// constructor. `this.constructor` should be this function too, but isn't.
|
||||
constructor = this.constructor;
|
||||
};
|
||||
|
||||
function CustomElement() {
|
||||
babelHelpers.classCallCheck(this, CustomElement);
|
||||
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(CustomElement).apply(this, arguments));
|
||||
}
|
||||
var constructor;
|
||||
|
||||
return CustomElement;
|
||||
}( /*#__PURE__*/babelHelpers.wrapNativeSuper(HTMLElement));
|
||||
var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
||||
"use strict";
|
||||
|
||||
;
|
||||
new CustomElement();
|
||||
expect(constructor).toBe(CustomElement);
|
||||
babelHelpers.inherits(CustomElement, _HTMLElement);
|
||||
|
||||
var _super = _createSuper(CustomElement);
|
||||
|
||||
function CustomElement() {
|
||||
babelHelpers.classCallCheck(this, CustomElement);
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
return CustomElement;
|
||||
}( /*#__PURE__*/babelHelpers.wrapNativeSuper(HTMLElement));
|
||||
|
||||
;
|
||||
new CustomElement();
|
||||
expect(constructor).toBe(CustomElement);
|
||||
} finally {
|
||||
// Restore original env
|
||||
this.Reflect = oldReflect;
|
||||
this.HTMLElement = oldHTMLElement;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
function _createSuper(Derived) { return function () { var Super = babelHelpers.getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
var x = {
|
||||
Foo: /*#__PURE__*/function (_Foo) {
|
||||
"use strict";
|
||||
|
||||
babelHelpers.inherits(_class, _Foo);
|
||||
|
||||
var _super = _createSuper(_class);
|
||||
|
||||
function _class() {
|
||||
babelHelpers.classCallCheck(this, _class);
|
||||
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(_class).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
return _class;
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
function _createSuper(Derived) { return function () { var Super = babelHelpers.getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
var A = function A() {
|
||||
"use strict";
|
||||
|
||||
@@ -9,11 +13,13 @@ var B = /*#__PURE__*/function (_A) {
|
||||
|
||||
babelHelpers.inherits(B, _A);
|
||||
|
||||
var _super = _createSuper(B);
|
||||
|
||||
function B() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, B);
|
||||
return babelHelpers.possibleConstructorReturn(_this, _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(B).call(this)));
|
||||
return babelHelpers.possibleConstructorReturn(_this, _this = _super.call(this));
|
||||
}
|
||||
|
||||
return B;
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
@@ -23,12 +27,14 @@ var A = /*#__PURE__*/function (_B) {
|
||||
|
||||
_inherits(A, _B);
|
||||
|
||||
var _super = _createSuper(A);
|
||||
|
||||
function A(track) {
|
||||
var _this;
|
||||
|
||||
_classCallCheck(this, A);
|
||||
|
||||
if (track !== undefined) _this = _possibleConstructorReturn(this, _getPrototypeOf(A).call(this, track));else _this = _possibleConstructorReturn(this, _getPrototypeOf(A).call(this));
|
||||
if (track !== undefined) _this = _super.call(this, track);else _this = _super.call(this);
|
||||
return _possibleConstructorReturn(_this);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,17 +3,19 @@ var Test = /*#__PURE__*/function (_Foo) {
|
||||
|
||||
babelHelpers.inherits(Test, _Foo);
|
||||
|
||||
var _super = babelHelpers.createSuper(Test);
|
||||
|
||||
function Test() {
|
||||
var _babelHelpers$getProt, _babelHelpers$get;
|
||||
var _babelHelpers$get;
|
||||
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, Test);
|
||||
woops.super.test();
|
||||
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Test).call(this));
|
||||
_this = _super.call(this);
|
||||
babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this)).call(babelHelpers.assertThisInitialized(_this));
|
||||
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Test).apply(this, arguments));
|
||||
_this = babelHelpers.possibleConstructorReturn(this, (_babelHelpers$getProt = babelHelpers.getPrototypeOf(Test)).call.apply(_babelHelpers$getProt, [this, "test"].concat(Array.prototype.slice.call(arguments))));
|
||||
_this = _super.apply(this, arguments);
|
||||
_this = _super.call.apply(_super, [this, "test"].concat(Array.prototype.slice.call(arguments)));
|
||||
babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this)).apply(babelHelpers.assertThisInitialized(_this), arguments);
|
||||
|
||||
(_babelHelpers$get = babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this))).call.apply(_babelHelpers$get, [babelHelpers.assertThisInitialized(_this), "test"].concat(Array.prototype.slice.call(arguments)));
|
||||
|
||||
@@ -3,11 +3,13 @@ var Test = /*#__PURE__*/function (_Foo) {
|
||||
|
||||
babelHelpers.inherits(Test, _Foo);
|
||||
|
||||
var _super = babelHelpers.createSuper(Test);
|
||||
|
||||
function Test() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, Test);
|
||||
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Test).call(this));
|
||||
_this = _super.call(this);
|
||||
babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this));
|
||||
babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this)).whatever;
|
||||
return _this;
|
||||
|
||||
@@ -3,11 +3,13 @@ var Test = /*#__PURE__*/function (_Foo) {
|
||||
|
||||
babelHelpers.inherits(Test, _Foo);
|
||||
|
||||
var _super = babelHelpers.createSuper(Test);
|
||||
|
||||
function Test() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, Test);
|
||||
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Test).call(this));
|
||||
_this = _super.call(this);
|
||||
babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this)).whatever();
|
||||
babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this)).call(babelHelpers.assertThisInitialized(_this));
|
||||
return _this;
|
||||
|
||||
@@ -10,11 +10,13 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
|
||||
var _super = babelHelpers.createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, Foo);
|
||||
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
|
||||
_this = _super.call(this);
|
||||
_this.state = "test";
|
||||
return _this;
|
||||
}
|
||||
|
||||
@@ -3,13 +3,15 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
|
||||
var _super = babelHelpers.createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, Foo);
|
||||
return _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this, () => {
|
||||
return _this = _super.call(this, () => {
|
||||
_this.test;
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
return Foo;
|
||||
|
||||
@@ -3,11 +3,13 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
|
||||
var _super = babelHelpers.createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, Foo);
|
||||
if (eval("false")) _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
|
||||
if (eval("false")) _this = _super.call(this);
|
||||
return babelHelpers.possibleConstructorReturn(_this);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,12 +3,14 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
|
||||
var _super = babelHelpers.createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, Foo);
|
||||
|
||||
var fn = () => _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
|
||||
var fn = () => _this = _super.call(this);
|
||||
|
||||
fn();
|
||||
return babelHelpers.possibleConstructorReturn(_this);
|
||||
|
||||
@@ -3,12 +3,14 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
|
||||
var _super = babelHelpers.createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, Foo);
|
||||
|
||||
var fn = () => _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
|
||||
var fn = () => _this = _super.call(this);
|
||||
|
||||
return babelHelpers.possibleConstructorReturn(_this);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
|
||||
var _super = babelHelpers.createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ var Child = /*#__PURE__*/function (_Base) {
|
||||
|
||||
babelHelpers.inherits(Child, _Base);
|
||||
|
||||
var _super = babelHelpers.createSuper(Child);
|
||||
|
||||
function Child() {
|
||||
var _this;
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ var Child = /*#__PURE__*/function (_Base) {
|
||||
|
||||
babelHelpers.inherits(Child, _Base);
|
||||
|
||||
var _super = babelHelpers.createSuper(Child);
|
||||
|
||||
function Child() {
|
||||
var _this;
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
var _default = /*#__PURE__*/function (_A) {
|
||||
babelHelpers.inherits(_default, _A);
|
||||
|
||||
var _super = babelHelpers.createSuper(_default);
|
||||
|
||||
function _default() {
|
||||
babelHelpers.classCallCheck(this, _default);
|
||||
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(_default).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
return _default;
|
||||
|
||||
35
packages/babel-plugin-transform-classes/test/fixtures/spec/extend-untranspiled-class/exec.js
vendored
Normal file
35
packages/babel-plugin-transform-classes/test/fixtures/spec/extend-untranspiled-class/exec.js
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
|
||||
var log = [];
|
||||
var SuperClass = require("module-which-exports-native-class");
|
||||
|
||||
class SubClass extends SuperClass {
|
||||
constructor() {
|
||||
log.push(4);
|
||||
super();
|
||||
}
|
||||
method() {
|
||||
log.push(5);
|
||||
super.method();
|
||||
}
|
||||
static method() {
|
||||
log.push(6);
|
||||
super.method();
|
||||
}
|
||||
}
|
||||
|
||||
new SubClass().method();
|
||||
SubClass.method();
|
||||
|
||||
expect(log).toEqual([4, 1, 5, 2, 6, 3]);
|
||||
|
||||
// Magic function to avoid transpiling class
|
||||
function require() {
|
||||
return eval(`(
|
||||
class SuperClass {
|
||||
constructor() { log.push(1); }
|
||||
method() { log.push(2); }
|
||||
static method() { log.push(3); }
|
||||
}
|
||||
)`);
|
||||
}
|
||||
@@ -13,6 +13,8 @@ var Hello = function Hello() {
|
||||
var Outer = /*#__PURE__*/function (_Hello) {
|
||||
babelHelpers.inherits(Outer, _Hello);
|
||||
|
||||
var _super = babelHelpers.createSuper(Outer);
|
||||
|
||||
function Outer() {
|
||||
var _this2 = this;
|
||||
|
||||
@@ -26,7 +28,7 @@ var Outer = /*#__PURE__*/function (_Hello) {
|
||||
}
|
||||
|
||||
babelHelpers.createClass(Inner, [{
|
||||
key: _this = babelHelpers.possibleConstructorReturn(_this2, babelHelpers.getPrototypeOf(Outer).call(_this2)),
|
||||
key: _this = _super.call(_this2),
|
||||
value: function value() {
|
||||
return 'hello';
|
||||
}
|
||||
|
||||
@@ -17,11 +17,13 @@ var Hello = /*#__PURE__*/function () {
|
||||
var Outer = /*#__PURE__*/function (_Hello) {
|
||||
babelHelpers.inherits(Outer, _Hello);
|
||||
|
||||
var _super = babelHelpers.createSuper(Outer);
|
||||
|
||||
function Outer() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, Outer);
|
||||
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Outer).call(this));
|
||||
_this = _super.call(this);
|
||||
|
||||
var Inner = /*#__PURE__*/function () {
|
||||
function Inner() {
|
||||
|
||||
@@ -13,12 +13,14 @@ var Hello = function Hello() {
|
||||
var Outer = /*#__PURE__*/function (_Hello) {
|
||||
babelHelpers.inherits(Outer, _Hello);
|
||||
|
||||
var _super = babelHelpers.createSuper(Outer);
|
||||
|
||||
function Outer() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, Outer);
|
||||
var Inner = {
|
||||
[_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Outer).call(this))]() {
|
||||
[_this = _super.call(this)]() {
|
||||
return 'hello';
|
||||
}
|
||||
|
||||
|
||||
@@ -17,11 +17,13 @@ var Hello = /*#__PURE__*/function () {
|
||||
var Outer = /*#__PURE__*/function (_Hello) {
|
||||
babelHelpers.inherits(Outer, _Hello);
|
||||
|
||||
var _super = babelHelpers.createSuper(Outer);
|
||||
|
||||
function Outer() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, Outer);
|
||||
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Outer).call(this));
|
||||
_this = _super.call(this);
|
||||
var Inner = {
|
||||
[babelHelpers.get(babelHelpers.getPrototypeOf(Outer.prototype), "toString", babelHelpers.assertThisInitialized(_this)).call(babelHelpers.assertThisInitialized(_this))]() {
|
||||
return 'hello';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"plugins": [
|
||||
"external-helpers",
|
||||
["external-helpers", { "helperVersion": "7.100.0" }],
|
||||
"transform-function-name",
|
||||
"transform-classes",
|
||||
"transform-spread",
|
||||
|
||||
@@ -3,9 +3,11 @@ var TestEmpty = /*#__PURE__*/function (_ref) {
|
||||
|
||||
babelHelpers.inherits(TestEmpty, _ref);
|
||||
|
||||
var _super = babelHelpers.createSuper(TestEmpty);
|
||||
|
||||
function TestEmpty() {
|
||||
babelHelpers.classCallCheck(this, TestEmpty);
|
||||
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(TestEmpty).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
return TestEmpty;
|
||||
@@ -24,9 +26,11 @@ var TestConstructorOnly = /*#__PURE__*/function (_ref2) {
|
||||
|
||||
babelHelpers.inherits(TestConstructorOnly, _ref2);
|
||||
|
||||
var _super2 = babelHelpers.createSuper(TestConstructorOnly);
|
||||
|
||||
function TestConstructorOnly() {
|
||||
babelHelpers.classCallCheck(this, TestConstructorOnly);
|
||||
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(TestConstructorOnly).apply(this, arguments));
|
||||
return _super2.apply(this, arguments);
|
||||
}
|
||||
|
||||
return TestConstructorOnly;
|
||||
@@ -45,9 +49,11 @@ var TestMethodOnly = /*#__PURE__*/function (_ref3) {
|
||||
|
||||
babelHelpers.inherits(TestMethodOnly, _ref3);
|
||||
|
||||
var _super3 = babelHelpers.createSuper(TestMethodOnly);
|
||||
|
||||
function TestMethodOnly() {
|
||||
babelHelpers.classCallCheck(this, TestMethodOnly);
|
||||
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(TestMethodOnly).apply(this, arguments));
|
||||
return _super3.apply(this, arguments);
|
||||
}
|
||||
|
||||
return TestMethodOnly;
|
||||
@@ -70,9 +76,11 @@ var TestConstructorAndMethod = /*#__PURE__*/function (_ref4) {
|
||||
|
||||
babelHelpers.inherits(TestConstructorAndMethod, _ref4);
|
||||
|
||||
var _super4 = babelHelpers.createSuper(TestConstructorAndMethod);
|
||||
|
||||
function TestConstructorAndMethod() {
|
||||
babelHelpers.classCallCheck(this, TestConstructorAndMethod);
|
||||
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(TestConstructorAndMethod).apply(this, arguments));
|
||||
return _super4.apply(this, arguments);
|
||||
}
|
||||
|
||||
return TestConstructorAndMethod;
|
||||
@@ -95,9 +103,11 @@ var TestMultipleMethods = /*#__PURE__*/function (_ref5) {
|
||||
|
||||
babelHelpers.inherits(TestMultipleMethods, _ref5);
|
||||
|
||||
var _super5 = babelHelpers.createSuper(TestMultipleMethods);
|
||||
|
||||
function TestMultipleMethods() {
|
||||
babelHelpers.classCallCheck(this, TestMultipleMethods);
|
||||
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(TestMultipleMethods).apply(this, arguments));
|
||||
return _super5.apply(this, arguments);
|
||||
}
|
||||
|
||||
return TestMultipleMethods;
|
||||
|
||||
@@ -3,9 +3,11 @@ var BaseController = /*#__PURE__*/function (_Chaplin$Controller) {
|
||||
|
||||
babelHelpers.inherits(BaseController, _Chaplin$Controller);
|
||||
|
||||
var _super = babelHelpers.createSuper(BaseController);
|
||||
|
||||
function BaseController() {
|
||||
babelHelpers.classCallCheck(this, BaseController);
|
||||
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(BaseController).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
return BaseController;
|
||||
@@ -16,9 +18,11 @@ var BaseController2 = /*#__PURE__*/function (_Chaplin$Controller$A) {
|
||||
|
||||
babelHelpers.inherits(BaseController2, _Chaplin$Controller$A);
|
||||
|
||||
var _super2 = babelHelpers.createSuper(BaseController2);
|
||||
|
||||
function BaseController2() {
|
||||
babelHelpers.classCallCheck(this, BaseController2);
|
||||
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(BaseController2).apply(this, arguments));
|
||||
return _super2.apply(this, arguments);
|
||||
}
|
||||
|
||||
return BaseController2;
|
||||
|
||||
@@ -3,9 +3,11 @@ var Test = /*#__PURE__*/function (_Foo) {
|
||||
|
||||
babelHelpers.inherits(Test, _Foo);
|
||||
|
||||
var _super = babelHelpers.createSuper(Test);
|
||||
|
||||
function Test() {
|
||||
babelHelpers.classCallCheck(this, Test);
|
||||
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Test).apply(this, arguments));
|
||||
return _super.apply(this, arguments);
|
||||
}
|
||||
|
||||
return Test;
|
||||
|
||||
14
packages/babel-plugin-transform-classes/test/fixtures/spec/super-correct-new-target/exec.js
vendored
Normal file
14
packages/babel-plugin-transform-classes/test/fixtures/spec/super-correct-new-target/exec.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
let NewTarget;
|
||||
|
||||
class A {
|
||||
constructor() { NewTarget = new.target; }
|
||||
}
|
||||
class B extends A {}
|
||||
|
||||
new A();
|
||||
expect(NewTarget).toBe(A);
|
||||
|
||||
new B();
|
||||
expect(NewTarget).toBe(B);
|
||||
15
packages/babel-plugin-transform-classes/test/fixtures/spec/super-proto-modifications/exec.js
vendored
Normal file
15
packages/babel-plugin-transform-classes/test/fixtures/spec/super-proto-modifications/exec.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
var A_called = false;
|
||||
var X_called = false;
|
||||
|
||||
class A { constructor() { A_called = true } }
|
||||
class X { constructor() { X_called = true } }
|
||||
class B extends A {}
|
||||
|
||||
B.prototype.__proto__ = X.prototype;
|
||||
B.__proto__ = X;
|
||||
|
||||
expect(new B() instanceof B).toBe(true);
|
||||
expect(new B() instanceof A).toBe(false);
|
||||
expect(new B() instanceof X).toBe(true);
|
||||
expect(A_called).toBe(false);
|
||||
expect(X_called).toBe(true);
|
||||
@@ -1,9 +1,13 @@
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
@@ -19,12 +23,14 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
_inherits(Foo, _Bar);
|
||||
|
||||
var _super = _createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
_classCallCheck(this, Foo);
|
||||
|
||||
_get(_getPrototypeOf(Foo.prototype), "foo", _assertThisInitialized(_this)).call(_assertThisInitialized(_this), _this = _possibleConstructorReturn(this, _getPrototypeOf(Foo).call(this)));
|
||||
_get(_getPrototypeOf(Foo.prototype), "foo", _assertThisInitialized(_this)).call(_assertThisInitialized(_this), _this = _super.call(this));
|
||||
|
||||
return _this;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
@@ -19,6 +23,8 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
_inherits(Foo, _Bar);
|
||||
|
||||
var _super = _createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
@@ -26,7 +32,7 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
_get(_getPrototypeOf(Foo.prototype), "foo", _assertThisInitialized(_this)).call(_assertThisInitialized(_this));
|
||||
|
||||
return _this = _possibleConstructorReturn(this, _getPrototypeOf(Foo).call(this));
|
||||
return _this = _super.call(this);
|
||||
}
|
||||
|
||||
return Foo;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"plugins": [
|
||||
"external-helpers",
|
||||
["external-helpers", { "helperVersion": "7.100.0" }],
|
||||
"transform-classes",
|
||||
"transform-block-scoping"
|
||||
]
|
||||
|
||||
@@ -3,6 +3,8 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
|
||||
var _super = babelHelpers.createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
@@ -11,7 +13,7 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
var t = () => babelHelpers.get(babelHelpers.getPrototypeOf(Foo.prototype), "test", babelHelpers.assertThisInitialized(_this)).call(babelHelpers.assertThisInitialized(_this));
|
||||
|
||||
babelHelpers.get(babelHelpers.getPrototypeOf(Foo.prototype), "foo", babelHelpers.assertThisInitialized(_this)).call(babelHelpers.assertThisInitialized(_this));
|
||||
return _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
|
||||
return _this = _super.call(this);
|
||||
}
|
||||
|
||||
return Foo;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"plugins": [
|
||||
"external-helpers",
|
||||
["external-helpers", { "helperVersion": "7.100.0" }],
|
||||
"transform-classes",
|
||||
"transform-block-scoping"
|
||||
]
|
||||
|
||||
@@ -3,6 +3,8 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
|
||||
var _super = babelHelpers.createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
@@ -10,7 +12,7 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
var t = () => babelHelpers.get(babelHelpers.getPrototypeOf(Foo.prototype), "test", babelHelpers.assertThisInitialized(_this)).call(babelHelpers.assertThisInitialized(_this));
|
||||
|
||||
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
|
||||
_this = _super.call(this);
|
||||
t();
|
||||
return _this;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"plugins": [
|
||||
"external-helpers",
|
||||
["external-helpers", { "helperVersion": "7.100.0" }],
|
||||
"transform-classes",
|
||||
"transform-block-scoping"
|
||||
]
|
||||
|
||||
@@ -3,6 +3,8 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
|
||||
var _super = babelHelpers.createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
@@ -10,7 +12,7 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
var t = () => babelHelpers.get(babelHelpers.getPrototypeOf(Foo.prototype), "test", babelHelpers.assertThisInitialized(_this)).call(babelHelpers.assertThisInitialized(_this));
|
||||
|
||||
return _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
|
||||
return _this = _super.call(this);
|
||||
}
|
||||
|
||||
return Foo;
|
||||
|
||||
@@ -3,11 +3,13 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
|
||||
var _super = babelHelpers.createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, Foo);
|
||||
babelHelpers.get(babelHelpers.getPrototypeOf(Foo.prototype), (_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this))).method, babelHelpers.assertThisInitialized(_this)).call(babelHelpers.assertThisInitialized(_this));
|
||||
babelHelpers.get(babelHelpers.getPrototypeOf(Foo.prototype), (_this = _super.call(this)).method, babelHelpers.assertThisInitialized(_this)).call(babelHelpers.assertThisInitialized(_this));
|
||||
return _this;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,11 +3,13 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
|
||||
var _super = babelHelpers.createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, Foo);
|
||||
return _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this, babelHelpers.assertThisInitialized(_this)));
|
||||
return _this = _super.call(this, babelHelpers.assertThisInitialized(_this));
|
||||
}
|
||||
|
||||
return Foo;
|
||||
|
||||
@@ -3,6 +3,8 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
|
||||
var _super = babelHelpers.createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
@@ -11,7 +13,7 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
var fn = () => babelHelpers.assertThisInitialized(_this);
|
||||
|
||||
fn();
|
||||
return _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
|
||||
return _this = _super.call(this);
|
||||
}
|
||||
|
||||
return Foo;
|
||||
|
||||
@@ -3,6 +3,8 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
|
||||
var _super = babelHelpers.createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
@@ -10,7 +12,7 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
var fn = () => babelHelpers.assertThisInitialized(_this);
|
||||
|
||||
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
|
||||
_this = _super.call(this);
|
||||
fn();
|
||||
return _this;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
|
||||
var _super = babelHelpers.createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
|
||||
@@ -3,12 +3,14 @@ var Foo = /*#__PURE__*/function (_Bar) {
|
||||
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
|
||||
var _super = babelHelpers.createSuper(Foo);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, Foo);
|
||||
_this.foo = "bar";
|
||||
return _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
|
||||
return _this = _super.call(this);
|
||||
}
|
||||
|
||||
return Foo;
|
||||
|
||||
Reference in New Issue
Block a user