Files
node/tools/eslint/node_modules/@babel/helpers/lib/helpers/createSuper.js
T
Michaël Zasso 30fdd482a1 tools: move ESLint to tools/eslint
Greatly simplify how ESLint and its plugins are installed.

PR-URL: https://github.com/nodejs/node/pull/53413
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-06-20 14:45:27 +02:00

26 lines
818 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _createSuper;
var _getPrototypeOf = require("getPrototypeOf");
var _isNativeReflectConstruct = require("isNativeReflectConstruct");
var _possibleConstructorReturn = require("possibleConstructorReturn");
function _createSuper(Derived) {
var hasNativeReflectConstruct = _isNativeReflectConstruct();
return function _createSuperInternal() {
var Super = _getPrototypeOf(Derived),
result;
if (hasNativeReflectConstruct) {
var NewTarget = _getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else {
result = Super.apply(this, arguments);
}
return _possibleConstructorReturn(this, result);
};
}
//# sourceMappingURL=createSuper.js.map