arcast/node_modules/@babel/helpers/lib/helpers.js.map

1 line
72 KiB
Plaintext
Raw Normal View History

2024-04-24 17:32:01 +02:00
{"version":3,"names":["_template","require","_helpersGenerated","helpers","Object","assign","__proto__","generated","_default","exports","default","helper","minVersion","tpl","ast","template","program","AwaitValue","wrapAsyncGenerator","asyncToGenerator","classCallCheck","createClass","defineEnumerableProperties","defaults","defineProperty","extends","objectSpread","inherits","inheritsLoose","getPrototypeOf","setPrototypeOf","isNativeFunction","wrapNativeSuper","instanceof","interopRequireDefault","newArrowCheck","objectDestructuringEmpty","objectWithoutPropertiesLoose","objectWithoutProperties","assertThisInitialized","possibleConstructorReturn","createSuper","superPropBase","get","set","taggedTemplateLiteral","taggedTemplateLiteralLoose","readOnlyError","writeOnlyError","classNameTDZError","temporalUndefined","tdz","temporalRef","slicedToArray","slicedToArrayLoose","toArray","toConsumableArray","arrayWithoutHoles","arrayWithHoles","maybeArrayLike","iterableToArray","unsupportedIterableToArray","arrayLikeToArray","nonIterableSpread","nonIterableRest","createForOfIteratorHelper","createForOfIteratorHelperLoose","skipFirstGeneratorNext","initializerWarningHelper","initializerDefineProperty","applyDecoratedDescriptor","classPrivateFieldLooseKey","classPrivateFieldLooseBase","classPrivateFieldGet","classPrivateFieldSet","classPrivateFieldDestructureSet","classExtractFieldDescriptor","classStaticPrivateFieldSpecGet","classStaticPrivateFieldSpecSet","classStaticPrivateMethodGet","classStaticPrivateMethodSet","classApplyDescriptorGet","classApplyDescriptorSet","classApplyDescriptorDestructureSet","classStaticPrivateFieldDestructureSet","classCheckPrivateStaticAccess","classCheckPrivateStaticFieldDescriptor","decorate","classPrivateMethodGet","checkPrivateRedeclaration","classPrivateFieldInitSpec","classPrivateMethodInitSpec","classPrivateMethodSet","identity","nullishReceiverError"],"sources":["../src/helpers.ts"],"sourcesContent":["import template from \"@babel/template\";\nimport type * as t from \"@babel/types\";\n\nimport generated from \"./helpers-generated.ts\";\n\ninterface Helper {\n minVersion: string;\n ast: () => t.Program;\n}\n\nconst helpers: Record<string, Helper> = { __proto__: null, ...generated };\nexport default helpers;\n\nconst helper = (minVersion: string) => (tpl: TemplateStringsArray) => ({\n minVersion,\n ast: () => template.program.ast(tpl),\n});\n\nif (!process.env.BABEL_8_BREAKING) {\n helpers.AwaitValue = helper(\"7.0.0-beta.0\")`\n export default function _AwaitValue(value) {\n this.wrapped = value;\n }\n `;\n}\n\nhelpers.wrapAsyncGenerator = helper(\"7.0.0-beta.0\")`\n import AsyncGenerator from \"AsyncGenerator\";\n\n export default function _wrapAsyncGenerator(fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n }\n`;\n\nhelpers.asyncToGenerator = helper(\"7.0.0-beta.0\")`\n function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n }\n\n export default function _asyncToGenerator(fn) {\n return function () {\n var self = this, args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n }\n`;\n\nhelpers.classCallCheck = helper(\"7.0.0-beta.0\")`\n export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n`;\n\nhelpers.createClass = helper(\"7.0.0-beta.0\