mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 18:28:13 +03:00
99f4f0f280
swc_ecma_parser: - Support `private declare`. (#1503) - Recover `backtracking` state while doing some nested backtracking. (#1505) - Allow using `readonly` as the name of class properties. (#1514) swc_ecma_transforms_base: - `hygiene`: Keep the name of class expressions. (#1507) swc_ecma_transforms_typescript: - Allow a namespace and a class to have the same name. (#1515) swc: - Disable `tsx` if the ext of a file is ts.
59 lines
1.9 KiB
TypeScript
59 lines
1.9 KiB
TypeScript
function _assertThisInitialized(self) {
|
|
if (self === void 0) {
|
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
}
|
|
return self;
|
|
}
|
|
function _classCallCheck(instance, Constructor) {
|
|
if (!(instance instanceof Constructor)) {
|
|
throw new TypeError("Cannot call a class as a function");
|
|
}
|
|
}
|
|
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);
|
|
}
|
|
function _possibleConstructorReturn(self, call) {
|
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
return call;
|
|
}
|
|
return _assertThisInitialized(self);
|
|
}
|
|
function _setPrototypeOf(o, p) {
|
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
o.__proto__ = p;
|
|
return o;
|
|
};
|
|
return _setPrototypeOf(o, p);
|
|
}
|
|
var _typeof = function(obj) {
|
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
};
|
|
var withTeamsForUser = function() {
|
|
var _class = function(Component) {
|
|
"use strict";
|
|
_inherits(_class, Component);
|
|
function _class() {
|
|
_classCallCheck(this, _class);
|
|
return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
|
|
}
|
|
return _class;
|
|
}(Component);
|
|
_class.displayName = "x";
|
|
};
|