@swc/helpers
Advanced tools
Comparing version 0.5.11 to 0.5.12
@@ -1,2 +0,2 @@ | ||
export function _apply_decorated_descriptor(target, property, decorators, descriptor, context) { | ||
function _apply_decorated_descriptor(target, property, decorators, descriptor, context) { | ||
var desc = {}; | ||
@@ -3,0 +3,0 @@ |
@@ -21,3 +21,3 @@ /* @minVersion 7.20.0 */ | ||
export function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) { | ||
function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) { | ||
function createAddInitializerMethod(initializers, decoratorFinishedRef) { | ||
@@ -24,0 +24,0 @@ return function addInitializer(initializer) { |
@@ -1,2 +0,2 @@ | ||
export function _array_like_to_array(arr, len) { | ||
function _array_like_to_array(arr, len) { | ||
if (len == null || len > arr.length) len = arr.length; | ||
@@ -3,0 +3,0 @@ |
@@ -1,4 +0,4 @@ | ||
export function _array_with_holes(arr) { | ||
function _array_with_holes(arr) { | ||
if (Array.isArray(arr)) return arr; | ||
} | ||
export { _array_with_holes as _ }; |
@@ -1,6 +0,6 @@ | ||
import { _array_like_to_array } from "./_array_like_to_array.js"; | ||
import { _ as _array_like_to_array } from "./_array_like_to_array.js"; | ||
export function _array_without_holes(arr) { | ||
function _array_without_holes(arr) { | ||
if (Array.isArray(arr)) return _array_like_to_array(arr); | ||
} | ||
export { _array_without_holes as _ }; |
@@ -1,2 +0,2 @@ | ||
export function _assert_this_initialized(self) { | ||
function _assert_this_initialized(self) { | ||
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
export function _async_generator_delegate(inner, awaitWrap) { | ||
function _async_generator_delegate(inner, awaitWrap) { | ||
var iter = {}, waiting = false; | ||
@@ -3,0 +3,0 @@ |
@@ -1,4 +0,4 @@ | ||
import { _await_value } from "./_await_value.js"; | ||
import { _ as _await_value } from "./_await_value.js"; | ||
export function _async_generator(gen) { | ||
function _async_generator(gen) { | ||
var front, back; | ||
@@ -5,0 +5,0 @@ |
@@ -1,2 +0,2 @@ | ||
export function _async_iterator(iterable) { | ||
function _async_iterator(iterable) { | ||
var method, async, sync, retry = 2; | ||
@@ -3,0 +3,0 @@ for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) { |
@@ -12,3 +12,3 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { | ||
} | ||
export function _async_to_generator(fn) { | ||
function _async_to_generator(fn) { | ||
return function() { | ||
@@ -15,0 +15,0 @@ var self = this, args = arguments; |
@@ -1,6 +0,6 @@ | ||
import { _await_value } from "./_await_value.js"; | ||
import { _ as _await_value } from "./_await_value.js"; | ||
export function _await_async_generator(value) { | ||
function _await_async_generator(value) { | ||
return new _await_value(value); | ||
} | ||
export { _await_async_generator as _ }; |
@@ -1,4 +0,4 @@ | ||
export function _await_value(value) { | ||
function _await_value(value) { | ||
this.wrapped = value; | ||
} | ||
export { _await_value as _ }; |
@@ -1,2 +0,2 @@ | ||
export function _check_private_redeclaration(obj, privateCollection) { | ||
function _check_private_redeclaration(obj, privateCollection) { | ||
if (privateCollection.has(obj)) { | ||
@@ -3,0 +3,0 @@ throw new TypeError("Cannot initialize the same private elements twice on an object"); |
@@ -1,2 +0,2 @@ | ||
export function _class_apply_descriptor_destructure(receiver, descriptor) { | ||
function _class_apply_descriptor_destructure(receiver, descriptor) { | ||
if (descriptor.set) { | ||
@@ -3,0 +3,0 @@ if (!("__destrObj" in descriptor)) { |
@@ -1,2 +0,2 @@ | ||
export function _class_apply_descriptor_get(receiver, descriptor) { | ||
function _class_apply_descriptor_get(receiver, descriptor) { | ||
if (descriptor.get) return descriptor.get.call(receiver); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
export function _class_apply_descriptor_set(receiver, descriptor, value) { | ||
function _class_apply_descriptor_set(receiver, descriptor, value) { | ||
if (descriptor.set) descriptor.set.call(receiver, value); | ||
@@ -3,0 +3,0 @@ else { |
@@ -1,2 +0,2 @@ | ||
export function _class_apply_descriptor_update(receiver, descriptor) { | ||
function _class_apply_descriptor_update(receiver, descriptor) { | ||
if (descriptor.set) { | ||
@@ -3,0 +3,0 @@ if (!descriptor.get) throw new TypeError("attempted to read set only private field"); |
@@ -1,4 +0,4 @@ | ||
export function _class_call_check(instance, Constructor) { | ||
function _class_call_check(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); | ||
} | ||
export { _class_call_check as _ }; |
@@ -1,4 +0,4 @@ | ||
export function _class_check_private_static_access(receiver, classConstructor) { | ||
function _class_check_private_static_access(receiver, classConstructor) { | ||
if (receiver !== classConstructor) throw new TypeError("Private static access of wrong provenance"); | ||
} | ||
export { _class_check_private_static_access as _ }; |
@@ -1,2 +0,2 @@ | ||
export function _class_check_private_static_field_descriptor(descriptor, action) { | ||
function _class_check_private_static_field_descriptor(descriptor, action) { | ||
if (descriptor === undefined) { | ||
@@ -3,0 +3,0 @@ throw new TypeError("attempted to " + action + " private static field before its declaration"); |
@@ -1,2 +0,2 @@ | ||
export function _class_extract_field_descriptor(receiver, privateMap, action) { | ||
function _class_extract_field_descriptor(receiver, privateMap, action) { | ||
if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance"); | ||
@@ -3,0 +3,0 @@ |
@@ -1,4 +0,4 @@ | ||
export function _class_name_tdz_error(name) { | ||
function _class_name_tdz_error(name) { | ||
throw new Error("Class \"" + name + "\" cannot be referenced in computed property keys."); | ||
} | ||
export { _class_name_tdz_error as _ }; |
@@ -1,5 +0,5 @@ | ||
import { _class_apply_descriptor_destructure } from "./_class_apply_descriptor_destructure.js"; | ||
import { _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; | ||
import { _ as _class_apply_descriptor_destructure } from "./_class_apply_descriptor_destructure.js"; | ||
import { _ as _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; | ||
export function _class_private_field_destructure(receiver, privateMap) { | ||
function _class_private_field_destructure(receiver, privateMap) { | ||
var descriptor = _class_extract_field_descriptor(receiver, privateMap, "set"); | ||
@@ -6,0 +6,0 @@ return _class_apply_descriptor_destructure(receiver, descriptor); |
@@ -1,5 +0,5 @@ | ||
import { _class_apply_descriptor_get } from "./_class_apply_descriptor_get.js"; | ||
import { _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; | ||
import { _ as _class_apply_descriptor_get } from "./_class_apply_descriptor_get.js"; | ||
import { _ as _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; | ||
export function _class_private_field_get(receiver, privateMap) { | ||
function _class_private_field_get(receiver, privateMap) { | ||
var descriptor = _class_extract_field_descriptor(receiver, privateMap, "get"); | ||
@@ -6,0 +6,0 @@ return _class_apply_descriptor_get(receiver, descriptor); |
@@ -1,4 +0,4 @@ | ||
import { _check_private_redeclaration } from "./_check_private_redeclaration.js"; | ||
import { _ as _check_private_redeclaration } from "./_check_private_redeclaration.js"; | ||
export function _class_private_field_init(obj, privateMap, value) { | ||
function _class_private_field_init(obj, privateMap, value) { | ||
_check_private_redeclaration(obj, privateMap); | ||
@@ -5,0 +5,0 @@ privateMap.set(obj, value); |
@@ -1,2 +0,2 @@ | ||
export function _class_private_field_loose_base(receiver, privateKey) { | ||
function _class_private_field_loose_base(receiver, privateKey) { | ||
if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { | ||
@@ -3,0 +3,0 @@ throw new TypeError("attempted to use private field on non-instance"); |
var id = 0; | ||
export function _class_private_field_loose_key(name) { | ||
function _class_private_field_loose_key(name) { | ||
return "__private_" + id++ + "_" + name; | ||
} | ||
export { _class_private_field_loose_key as _ }; |
@@ -1,5 +0,5 @@ | ||
import { _class_apply_descriptor_set } from "./_class_apply_descriptor_set.js"; | ||
import { _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; | ||
import { _ as _class_apply_descriptor_set } from "./_class_apply_descriptor_set.js"; | ||
import { _ as _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; | ||
export function _class_private_field_set(receiver, privateMap, value) { | ||
function _class_private_field_set(receiver, privateMap, value) { | ||
var descriptor = _class_extract_field_descriptor(receiver, privateMap, "set"); | ||
@@ -6,0 +6,0 @@ _class_apply_descriptor_set(receiver, descriptor, value); |
@@ -1,5 +0,5 @@ | ||
import { _class_apply_descriptor_update } from "./_class_apply_descriptor_update.js"; | ||
import { _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; | ||
import { _ as _class_apply_descriptor_update } from "./_class_apply_descriptor_update.js"; | ||
import { _ as _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; | ||
export function _class_private_field_update(receiver, privateMap) { | ||
function _class_private_field_update(receiver, privateMap) { | ||
var descriptor = _class_extract_field_descriptor(receiver, privateMap, "update"); | ||
@@ -6,0 +6,0 @@ return _class_apply_descriptor_update(receiver, descriptor); |
@@ -1,2 +0,2 @@ | ||
export function _class_private_method_get(receiver, privateSet, fn) { | ||
function _class_private_method_get(receiver, privateSet, fn) { | ||
if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance"); | ||
@@ -3,0 +3,0 @@ |
@@ -1,4 +0,4 @@ | ||
import { _check_private_redeclaration } from "./_check_private_redeclaration.js"; | ||
import { _ as _check_private_redeclaration } from "./_check_private_redeclaration.js"; | ||
export function _class_private_method_init(obj, privateSet) { | ||
function _class_private_method_init(obj, privateSet) { | ||
_check_private_redeclaration(obj, privateSet); | ||
@@ -5,0 +5,0 @@ privateSet.add(obj); |
@@ -1,4 +0,4 @@ | ||
export function _class_private_method_set() { | ||
function _class_private_method_set() { | ||
throw new TypeError("attempted to reassign private method"); | ||
} | ||
export { _class_private_method_set as _ }; |
@@ -1,6 +0,6 @@ | ||
import { _class_apply_descriptor_destructure } from "./_class_apply_descriptor_destructure.js"; | ||
import { _class_check_private_static_access } from "./_class_check_private_static_access.js"; | ||
import { _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; | ||
import { _ as _class_apply_descriptor_destructure } from "./_class_apply_descriptor_destructure.js"; | ||
import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; | ||
import { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; | ||
export function _class_static_private_field_destructure(receiver, classConstructor, descriptor) { | ||
function _class_static_private_field_destructure(receiver, classConstructor, descriptor) { | ||
_class_check_private_static_access(receiver, classConstructor); | ||
@@ -7,0 +7,0 @@ _class_check_private_static_field_descriptor(descriptor, "set"); |
@@ -1,6 +0,6 @@ | ||
import { _class_apply_descriptor_get } from "./_class_apply_descriptor_get.js"; | ||
import { _class_check_private_static_access } from "./_class_check_private_static_access.js"; | ||
import { _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; | ||
import { _ as _class_apply_descriptor_get } from "./_class_apply_descriptor_get.js"; | ||
import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; | ||
import { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; | ||
export function _class_static_private_field_spec_get(receiver, classConstructor, descriptor) { | ||
function _class_static_private_field_spec_get(receiver, classConstructor, descriptor) { | ||
_class_check_private_static_access(receiver, classConstructor); | ||
@@ -7,0 +7,0 @@ _class_check_private_static_field_descriptor(descriptor, "get"); |
@@ -1,6 +0,6 @@ | ||
import { _class_apply_descriptor_set } from "./_class_apply_descriptor_set.js"; | ||
import { _class_check_private_static_access } from "./_class_check_private_static_access.js"; | ||
import { _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; | ||
import { _ as _class_apply_descriptor_set } from "./_class_apply_descriptor_set.js"; | ||
import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; | ||
import { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; | ||
export function _class_static_private_field_spec_set(receiver, classConstructor, descriptor, value) { | ||
function _class_static_private_field_spec_set(receiver, classConstructor, descriptor, value) { | ||
_class_check_private_static_access(receiver, classConstructor); | ||
@@ -7,0 +7,0 @@ _class_check_private_static_field_descriptor(descriptor, "set"); |
@@ -1,6 +0,6 @@ | ||
import { _class_apply_descriptor_update } from "./_class_apply_descriptor_update.js"; | ||
import { _class_check_private_static_access } from "./_class_check_private_static_access.js"; | ||
import { _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; | ||
import { _ as _class_apply_descriptor_update } from "./_class_apply_descriptor_update.js"; | ||
import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; | ||
import { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; | ||
export function _class_static_private_field_update(receiver, classConstructor, descriptor) { | ||
function _class_static_private_field_update(receiver, classConstructor, descriptor) { | ||
_class_check_private_static_access(receiver, classConstructor); | ||
@@ -7,0 +7,0 @@ _class_check_private_static_field_descriptor(descriptor, "update"); |
@@ -1,4 +0,4 @@ | ||
import { _class_check_private_static_access } from "./_class_check_private_static_access.js"; | ||
import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; | ||
export function _class_static_private_method_get(receiver, classConstructor, method) { | ||
function _class_static_private_method_get(receiver, classConstructor, method) { | ||
_class_check_private_static_access(receiver, classConstructor); | ||
@@ -5,0 +5,0 @@ |
@@ -1,4 +0,4 @@ | ||
import { _is_native_reflect_construct } from "./_is_native_reflect_construct.js"; | ||
import { _set_prototype_of } from "./_set_prototype_of.js"; | ||
export function _construct(Parent, args, Class) { | ||
import { _ as _is_native_reflect_construct } from "./_is_native_reflect_construct.js"; | ||
import { _ as _set_prototype_of } from "./_set_prototype_of.js"; | ||
function _construct(Parent, args, Class) { | ||
if (_is_native_reflect_construct()) _construct = Reflect.construct; | ||
@@ -5,0 +5,0 @@ else { |
@@ -12,3 +12,3 @@ function _defineProperties(target, props) { | ||
} | ||
export function _create_class(Constructor, protoProps, staticProps) { | ||
function _create_class(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
@@ -15,0 +15,0 @@ if (staticProps) _defineProperties(Constructor, staticProps); |
@@ -1,4 +0,4 @@ | ||
import { _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; | ||
import { _ as _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; | ||
export function _create_for_of_iterator_helper_loose(o, allowArrayLike) { | ||
function _create_for_of_iterator_helper_loose(o, allowArrayLike) { | ||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; | ||
@@ -5,0 +5,0 @@ |
@@ -1,6 +0,6 @@ | ||
import { _get_prototype_of } from "./_get_prototype_of.js"; | ||
import { _is_native_reflect_construct } from "./_is_native_reflect_construct.js"; | ||
import { _possible_constructor_return } from "./_possible_constructor_return.js"; | ||
import { _ as _get_prototype_of } from "./_get_prototype_of.js"; | ||
import { _ as _is_native_reflect_construct } from "./_is_native_reflect_construct.js"; | ||
import { _ as _possible_constructor_return } from "./_possible_constructor_return.js"; | ||
export function _create_super(Derived) { | ||
function _create_super(Derived) { | ||
var hasNativeReflectConstruct = _is_native_reflect_construct(); | ||
@@ -7,0 +7,0 @@ |
@@ -1,6 +0,6 @@ | ||
import { _to_array } from "./_to_array.js"; | ||
import { _to_property_key } from "./_to_property_key.js"; | ||
import { _type_of } from "./_type_of.js"; | ||
import { _ as _to_array } from "./_to_array.js"; | ||
import { _ as _to_property_key } from "./_to_property_key.js"; | ||
import { _ as _type_of } from "./_type_of.js"; | ||
export function _decorate(decorators, factory, superClass) { | ||
function _decorate(decorators, factory, superClass) { | ||
var r = factory(function initialize(O) { | ||
@@ -7,0 +7,0 @@ _initializeInstanceElements(O, decorated.elements); |
@@ -1,2 +0,2 @@ | ||
export function _defaults(obj, defaults) { | ||
function _defaults(obj, defaults) { | ||
var keys = Object.getOwnPropertyNames(defaults); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
export function _define_enumerable_properties(obj, descs) { | ||
function _define_enumerable_properties(obj, descs) { | ||
for (var key in descs) { | ||
@@ -3,0 +3,0 @@ var desc = descs[key]; |
@@ -1,2 +0,2 @@ | ||
export function _define_property(obj, key, value) { | ||
function _define_property(obj, key, value) { | ||
if (key in obj) { | ||
@@ -3,0 +3,0 @@ Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); |
@@ -17,3 +17,3 @@ /* @minVersion 7.22.0 */ | ||
export function _dispose(stack, error, hasError) { | ||
function _dispose(stack, error, hasError) { | ||
function next() { | ||
@@ -20,0 +20,0 @@ while (stack.length > 0) { |
@@ -1,2 +0,2 @@ | ||
export function _export_star(from, to) { | ||
function _export_star(from, to) { | ||
Object.keys(from).forEach(function(k) { | ||
@@ -3,0 +3,0 @@ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) { |
@@ -1,2 +0,2 @@ | ||
export function _extends() { | ||
function _extends() { | ||
_extends = Object.assign || function assign(target) { | ||
@@ -3,0 +3,0 @@ for (var i = 1; i < arguments.length; i++) { |
@@ -1,2 +0,2 @@ | ||
export function _get_prototype_of(o) { | ||
function _get_prototype_of(o) { | ||
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) { | ||
@@ -3,0 +3,0 @@ return o.__proto__ || Object.getPrototypeOf(o); |
@@ -1,4 +0,4 @@ | ||
import { _super_prop_base } from "./_super_prop_base.js"; | ||
import { _ as _super_prop_base } from "./_super_prop_base.js"; | ||
export function _get(target, property, receiver) { | ||
function _get(target, property, receiver) { | ||
if (typeof Reflect !== "undefined" && Reflect.get) _get = Reflect.get; | ||
@@ -5,0 +5,0 @@ else { |
@@ -1,2 +0,2 @@ | ||
export function _identity(x) { | ||
function _identity(x) { | ||
return x; | ||
@@ -3,0 +3,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export function _inherits_loose(subClass, superClass) { | ||
function _inherits_loose(subClass, superClass) { | ||
subClass.prototype = Object.create(superClass.prototype); | ||
@@ -3,0 +3,0 @@ subClass.prototype.constructor = subClass; |
@@ -1,4 +0,4 @@ | ||
import { _set_prototype_of } from "./_set_prototype_of.js"; | ||
import { _ as _set_prototype_of } from "./_set_prototype_of.js"; | ||
export function _inherits(subClass, superClass) { | ||
function _inherits(subClass, superClass) { | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
@@ -5,0 +5,0 @@ throw new TypeError("Super expression must either be null or a function"); |
@@ -1,2 +0,2 @@ | ||
export function _initializer_define_property(target, property, descriptor, context) { | ||
function _initializer_define_property(target, property, descriptor, context) { | ||
if (!descriptor) return; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
export function _initializer_warning_helper(descriptor, context) { | ||
function _initializer_warning_helper(descriptor, context) { | ||
throw new Error( | ||
@@ -3,0 +3,0 @@ "Decorating class property failed. Please ensure that " |
@@ -1,2 +0,2 @@ | ||
export function _instanceof(left, right) { | ||
function _instanceof(left, right) { | ||
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { | ||
@@ -3,0 +3,0 @@ return !!right[Symbol.hasInstance](left); |
@@ -1,4 +0,4 @@ | ||
export function _interop_require_default(obj) { | ||
function _interop_require_default(obj) { | ||
return obj && obj.__esModule ? obj : { default: obj }; | ||
} | ||
export { _interop_require_default as _ }; |
@@ -11,3 +11,3 @@ function _getRequireWildcardCache(nodeInterop) { | ||
} | ||
export function _interop_require_wildcard(obj, nodeInterop) { | ||
function _interop_require_wildcard(obj, nodeInterop) { | ||
if (!nodeInterop && obj && obj.__esModule) return obj; | ||
@@ -14,0 +14,0 @@ if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj }; |
@@ -1,4 +0,4 @@ | ||
export function _is_native_function(fn) { | ||
function _is_native_function(fn) { | ||
return Function.toString.call(fn).indexOf("[native code]") !== -1; | ||
} | ||
export { _is_native_function as _ }; |
@@ -1,2 +0,2 @@ | ||
export function _is_native_reflect_construct() { | ||
function _is_native_reflect_construct() { | ||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; | ||
@@ -3,0 +3,0 @@ if (Reflect.construct.sham) return false; |
@@ -1,2 +0,2 @@ | ||
export function _iterable_to_array_limit_loose(arr, i) { | ||
function _iterable_to_array_limit_loose(arr, i) { | ||
var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
export function _iterable_to_array_limit(arr, i) { | ||
function _iterable_to_array_limit(arr, i) { | ||
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
export function _iterable_to_array(iter) { | ||
function _iterable_to_array(iter) { | ||
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) { | ||
@@ -3,0 +3,0 @@ return Array.from(iter); |
var REACT_ELEMENT_TYPE; | ||
export function _jsx(type, props, key, children) { | ||
function _jsx(type, props, key, children) { | ||
if (!REACT_ELEMENT_TYPE) { | ||
@@ -4,0 +4,0 @@ REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; |
@@ -1,4 +0,4 @@ | ||
export function _new_arrow_check(innerThis, boundThis) { | ||
function _new_arrow_check(innerThis, boundThis) { | ||
if (innerThis !== boundThis) throw new TypeError("Cannot instantiate an arrow function"); | ||
} | ||
export { _new_arrow_check as _ }; |
@@ -1,4 +0,4 @@ | ||
export function _non_iterable_rest() { | ||
function _non_iterable_rest() { | ||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
export { _non_iterable_rest as _ }; |
@@ -1,4 +0,4 @@ | ||
export function _non_iterable_spread() { | ||
function _non_iterable_spread() { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
export { _non_iterable_spread as _ }; |
@@ -1,2 +0,2 @@ | ||
export function _object_destructuring_empty(o) { | ||
function _object_destructuring_empty(o) { | ||
if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o); | ||
@@ -3,0 +3,0 @@ |
@@ -16,3 +16,3 @@ function ownKeys(object, enumerableOnly) { | ||
} | ||
export function _object_spread_props(target, source) { | ||
function _object_spread_props(target, source) { | ||
source = source != null ? source : {}; | ||
@@ -19,0 +19,0 @@ |
@@ -1,4 +0,4 @@ | ||
import { _define_property } from "./_define_property.js"; | ||
import { _ as _define_property } from "./_define_property.js"; | ||
export function _object_spread(target) { | ||
function _object_spread(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
@@ -5,0 +5,0 @@ var source = arguments[i] != null ? arguments[i] : {}; |
@@ -1,2 +0,2 @@ | ||
export function _object_without_properties_loose(source, excluded) { | ||
function _object_without_properties_loose(source, excluded) { | ||
if (source == null) return {}; | ||
@@ -3,0 +3,0 @@ |
@@ -1,4 +0,4 @@ | ||
import { _object_without_properties_loose } from "./_object_without_properties_loose.js"; | ||
import { _ as _object_without_properties_loose } from "./_object_without_properties_loose.js"; | ||
export function _object_without_properties(source, excluded) { | ||
function _object_without_properties(source, excluded) { | ||
if (source == null) return {}; | ||
@@ -5,0 +5,0 @@ |
@@ -1,5 +0,5 @@ | ||
import { _assert_this_initialized } from "./_assert_this_initialized.js"; | ||
import { _type_of } from "./_type_of.js"; | ||
import { _ as _assert_this_initialized } from "./_assert_this_initialized.js"; | ||
import { _ as _type_of } from "./_type_of.js"; | ||
export function _possible_constructor_return(self, call) { | ||
function _possible_constructor_return(self, call) { | ||
if (call && (_type_of(call) === "object" || typeof call === "function")) return call; | ||
@@ -6,0 +6,0 @@ |
@@ -1,4 +0,4 @@ | ||
export function _read_only_error(name) { | ||
function _read_only_error(name) { | ||
throw new TypeError("\"" + name + "\" is read-only"); | ||
} | ||
export { _read_only_error as _ }; |
@@ -1,2 +0,2 @@ | ||
export function _set_prototype_of(o, p) { | ||
function _set_prototype_of(o, p) { | ||
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) { | ||
@@ -3,0 +3,0 @@ o.__proto__ = p; |
@@ -1,3 +0,3 @@ | ||
import { _define_property } from "./_define_property.js"; | ||
import { _super_prop_base } from "./_super_prop_base.js"; | ||
import { _ as _define_property } from "./_define_property.js"; | ||
import { _ as _super_prop_base } from "./_super_prop_base.js"; | ||
@@ -36,3 +36,3 @@ function set(target, property, value, receiver) { | ||
export function _set(target, property, value, receiver, isStrict) { | ||
function _set(target, property, value, receiver, isStrict) { | ||
var s = set(target, property, value, receiver || target); | ||
@@ -39,0 +39,0 @@ if (!s && isStrict) throw new Error("failed to set property"); |
@@ -1,2 +0,2 @@ | ||
export function _skip_first_generator_next(fn) { | ||
function _skip_first_generator_next(fn) { | ||
return function() { | ||
@@ -3,0 +3,0 @@ var it = fn.apply(this, arguments); |
@@ -1,9 +0,9 @@ | ||
import { _array_with_holes } from "./_array_with_holes.js"; | ||
import { _iterable_to_array_limit_loose } from "./_iterable_to_array_limit_loose.js"; | ||
import { _non_iterable_rest } from "./_non_iterable_rest.js"; | ||
import { _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; | ||
import { _ as _array_with_holes } from "./_array_with_holes.js"; | ||
import { _ as _iterable_to_array_limit_loose } from "./_iterable_to_array_limit_loose.js"; | ||
import { _ as _non_iterable_rest } from "./_non_iterable_rest.js"; | ||
import { _ as _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; | ||
export function _sliced_to_array_loose(arr, i) { | ||
function _sliced_to_array_loose(arr, i) { | ||
return _array_with_holes(arr) || _iterable_to_array_limit_loose(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest(); | ||
} | ||
export { _sliced_to_array_loose as _ }; |
@@ -1,9 +0,9 @@ | ||
import { _array_with_holes } from "./_array_with_holes.js"; | ||
import { _iterable_to_array_limit } from "./_iterable_to_array_limit.js"; | ||
import { _non_iterable_rest } from "./_non_iterable_rest.js"; | ||
import { _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; | ||
import { _ as _array_with_holes } from "./_array_with_holes.js"; | ||
import { _ as _iterable_to_array_limit } from "./_iterable_to_array_limit.js"; | ||
import { _ as _non_iterable_rest } from "./_non_iterable_rest.js"; | ||
import { _ as _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; | ||
export function _sliced_to_array(arr, i) { | ||
function _sliced_to_array(arr, i) { | ||
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest(); | ||
} | ||
export { _sliced_to_array as _ }; |
@@ -1,4 +0,4 @@ | ||
import { _get_prototype_of } from "./_get_prototype_of.js"; | ||
import { _ as _get_prototype_of } from "./_get_prototype_of.js"; | ||
export function _super_prop_base(object, property) { | ||
function _super_prop_base(object, property) { | ||
while (!Object.prototype.hasOwnProperty.call(object, property)) { | ||
@@ -5,0 +5,0 @@ object = _get_prototype_of(object); |
@@ -1,2 +0,2 @@ | ||
export function _tagged_template_literal_loose(strings, raw) { | ||
function _tagged_template_literal_loose(strings, raw) { | ||
if (!raw) raw = strings.slice(0); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
export function _tagged_template_literal(strings, raw) { | ||
function _tagged_template_literal(strings, raw) { | ||
if (!raw) raw = strings.slice(0); | ||
@@ -3,0 +3,0 @@ |
@@ -1,4 +0,4 @@ | ||
export function _throw(e) { | ||
function _throw(e) { | ||
throw e; | ||
} | ||
export { _throw as _ }; |
@@ -1,9 +0,9 @@ | ||
import { _array_with_holes } from "./_array_with_holes.js"; | ||
import { _iterable_to_array } from "./_iterable_to_array.js"; | ||
import { _non_iterable_rest } from "./_non_iterable_rest.js"; | ||
import { _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; | ||
import { _ as _array_with_holes } from "./_array_with_holes.js"; | ||
import { _ as _iterable_to_array } from "./_iterable_to_array.js"; | ||
import { _ as _non_iterable_rest } from "./_non_iterable_rest.js"; | ||
import { _ as _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; | ||
export function _to_array(arr) { | ||
function _to_array(arr) { | ||
return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest(); | ||
} | ||
export { _to_array as _ }; |
@@ -1,9 +0,9 @@ | ||
import { _array_without_holes } from "./_array_without_holes.js"; | ||
import { _iterable_to_array } from "./_iterable_to_array.js"; | ||
import { _non_iterable_spread } from "./_non_iterable_spread.js"; | ||
import { _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; | ||
import { _ as _array_without_holes } from "./_array_without_holes.js"; | ||
import { _ as _iterable_to_array } from "./_iterable_to_array.js"; | ||
import { _ as _non_iterable_spread } from "./_non_iterable_spread.js"; | ||
import { _ as _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; | ||
export function _to_consumable_array(arr) { | ||
function _to_consumable_array(arr) { | ||
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread(); | ||
} | ||
export { _to_consumable_array as _ }; |
@@ -1,4 +0,4 @@ | ||
import { _type_of } from "./_type_of.js"; | ||
import { _ as _type_of } from "./_type_of.js"; | ||
export function _to_primitive(input, hint) { | ||
function _to_primitive(input, hint) { | ||
if (_type_of(input) !== "object" || input === null) return input; | ||
@@ -5,0 +5,0 @@ |
@@ -1,5 +0,5 @@ | ||
import { _to_primitive } from "./_to_primitive.js"; | ||
import { _type_of } from "./_type_of.js"; | ||
import { _ as _to_primitive } from "./_to_primitive.js"; | ||
import { _ as _type_of } from "./_type_of.js"; | ||
export function _to_property_key(arg) { | ||
function _to_property_key(arg) { | ||
var key = _to_primitive(arg, "string"); | ||
@@ -6,0 +6,0 @@ |
@@ -1,1 +0,1 @@ | ||
export { __decorate as _, __decorate as _ts_decorate } from "tslib"; | ||
export { __decorate as _ } from "tslib"; |
@@ -1,1 +0,1 @@ | ||
export { __generator as _, __generator as _ts_generator } from "tslib"; | ||
export { __generator as _ } from "tslib"; |
@@ -1,1 +0,1 @@ | ||
export { __metadata as _, __metadata as _ts_metadata } from "tslib"; | ||
export { __metadata as _ } from "tslib"; |
@@ -1,1 +0,1 @@ | ||
export { __param as _, __param as _ts_param } from "tslib"; | ||
export { __param as _ } from "tslib"; |
@@ -1,1 +0,1 @@ | ||
export { __values as _, __values as _ts_values } from "tslib"; | ||
export { __values as _ } from "tslib"; |
@@ -1,2 +0,2 @@ | ||
export function _type_of(obj) { | ||
function _type_of(obj) { | ||
"@swc/helpers - typeof"; | ||
@@ -3,0 +3,0 @@ |
@@ -1,4 +0,4 @@ | ||
import { _array_like_to_array } from "./_array_like_to_array.js"; | ||
import { _ as _array_like_to_array } from "./_array_like_to_array.js"; | ||
export function _unsupported_iterable_to_array(o, minLen) { | ||
function _unsupported_iterable_to_array(o, minLen) { | ||
if (!o) return; | ||
@@ -5,0 +5,0 @@ if (typeof o === "string") return _array_like_to_array(o, minLen); |
@@ -1,5 +0,5 @@ | ||
import { _get } from "./_get.js"; | ||
import { _set } from "./_set.js"; | ||
import { _ as _get } from "./_get.js"; | ||
import { _ as _set } from "./_set.js"; | ||
export function _update(target, property, receiver, isStrict) { | ||
function _update(target, property, receiver, isStrict) { | ||
return { | ||
@@ -6,0 +6,0 @@ get _() { |
@@ -1,2 +0,2 @@ | ||
export function _using_ctx() { | ||
function _using_ctx() { | ||
var _disposeSuppressedError = typeof SuppressedError === "function" | ||
@@ -3,0 +3,0 @@ // eslint-disable-next-line no-undef |
/* @minVersion 7.22.0 */ | ||
export function _using(stack, value, isAwait) { | ||
function _using(stack, value, isAwait) { | ||
if (value === null || value === void 0) return value; | ||
@@ -5,0 +5,0 @@ if (Object(value) !== value) { |
@@ -1,4 +0,4 @@ | ||
import { _async_generator } from "./_async_generator.js"; | ||
import { _ as _async_generator } from "./_async_generator.js"; | ||
export function _wrap_async_generator(fn) { | ||
function _wrap_async_generator(fn) { | ||
return function() { | ||
@@ -5,0 +5,0 @@ return new _async_generator(fn.apply(this, arguments)); |
@@ -1,7 +0,7 @@ | ||
import { _construct } from "./_construct.js"; | ||
import { _get_prototype_of } from "./_get_prototype_of.js"; | ||
import { _is_native_function } from "./_is_native_function.js"; | ||
import { _set_prototype_of } from "./_set_prototype_of.js"; | ||
import { _ as _construct } from "./_construct.js"; | ||
import { _ as _get_prototype_of } from "./_get_prototype_of.js"; | ||
import { _ as _is_native_function } from "./_is_native_function.js"; | ||
import { _ as _set_prototype_of } from "./_set_prototype_of.js"; | ||
export function _wrap_native_super(Class) { | ||
function _wrap_native_super(Class) { | ||
var _cache = typeof Map === "function" ? new Map() : undefined; | ||
@@ -8,0 +8,0 @@ _wrap_native_super = function(Class) { |
@@ -1,4 +0,4 @@ | ||
export function _write_only_error(name) { | ||
function _write_only_error(name) { | ||
throw new TypeError("\"" + name + "\" is write-only"); | ||
} | ||
export { _write_only_error as _ }; |
200
esm/index.js
/* This file is automatically generated and should not be manually edited. */ | ||
/* To modify this file, please run the `npm run build` command instead. */ | ||
export { _apply_decorated_descriptor } from "./_apply_decorated_descriptor.js"; | ||
export { _apply_decs_2203_r } from "./_apply_decs_2203_r.js"; | ||
export { _array_like_to_array } from "./_array_like_to_array.js"; | ||
export { _array_with_holes } from "./_array_with_holes.js"; | ||
export { _array_without_holes } from "./_array_without_holes.js"; | ||
export { _assert_this_initialized } from "./_assert_this_initialized.js"; | ||
export { _async_generator } from "./_async_generator.js"; | ||
export { _async_generator_delegate } from "./_async_generator_delegate.js"; | ||
export { _async_iterator } from "./_async_iterator.js"; | ||
export { _async_to_generator } from "./_async_to_generator.js"; | ||
export { _await_async_generator } from "./_await_async_generator.js"; | ||
export { _await_value } from "./_await_value.js"; | ||
export { _check_private_redeclaration } from "./_check_private_redeclaration.js"; | ||
export { _class_apply_descriptor_destructure } from "./_class_apply_descriptor_destructure.js"; | ||
export { _class_apply_descriptor_get } from "./_class_apply_descriptor_get.js"; | ||
export { _class_apply_descriptor_set } from "./_class_apply_descriptor_set.js"; | ||
export { _class_apply_descriptor_update } from "./_class_apply_descriptor_update.js"; | ||
export { _class_call_check } from "./_class_call_check.js"; | ||
export { _class_check_private_static_access } from "./_class_check_private_static_access.js"; | ||
export { _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; | ||
export { _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; | ||
export { _class_name_tdz_error } from "./_class_name_tdz_error.js"; | ||
export { _class_private_field_destructure } from "./_class_private_field_destructure.js"; | ||
export { _class_private_field_get } from "./_class_private_field_get.js"; | ||
export { _class_private_field_init } from "./_class_private_field_init.js"; | ||
export { _class_private_field_loose_base } from "./_class_private_field_loose_base.js"; | ||
export { _class_private_field_loose_key } from "./_class_private_field_loose_key.js"; | ||
export { _class_private_field_set } from "./_class_private_field_set.js"; | ||
export { _class_private_field_update } from "./_class_private_field_update.js"; | ||
export { _class_private_method_get } from "./_class_private_method_get.js"; | ||
export { _class_private_method_init } from "./_class_private_method_init.js"; | ||
export { _class_private_method_set } from "./_class_private_method_set.js"; | ||
export { _class_static_private_field_destructure } from "./_class_static_private_field_destructure.js"; | ||
export { _class_static_private_field_spec_get } from "./_class_static_private_field_spec_get.js"; | ||
export { _class_static_private_field_spec_set } from "./_class_static_private_field_spec_set.js"; | ||
export { _class_static_private_field_update } from "./_class_static_private_field_update.js"; | ||
export { _class_static_private_method_get } from "./_class_static_private_method_get.js"; | ||
export { _construct } from "./_construct.js"; | ||
export { _create_class } from "./_create_class.js"; | ||
export { _create_for_of_iterator_helper_loose } from "./_create_for_of_iterator_helper_loose.js"; | ||
export { _create_super } from "./_create_super.js"; | ||
export { _decorate } from "./_decorate.js"; | ||
export { _defaults } from "./_defaults.js"; | ||
export { _define_enumerable_properties } from "./_define_enumerable_properties.js"; | ||
export { _define_property } from "./_define_property.js"; | ||
export { _dispose } from "./_dispose.js"; | ||
export { _export_star } from "./_export_star.js"; | ||
export { _extends } from "./_extends.js"; | ||
export { _get } from "./_get.js"; | ||
export { _get_prototype_of } from "./_get_prototype_of.js"; | ||
export { _identity } from "./_identity.js"; | ||
export { _inherits } from "./_inherits.js"; | ||
export { _inherits_loose } from "./_inherits_loose.js"; | ||
export { _initializer_define_property } from "./_initializer_define_property.js"; | ||
export { _initializer_warning_helper } from "./_initializer_warning_helper.js"; | ||
export { _instanceof } from "./_instanceof.js"; | ||
export { _interop_require_default } from "./_interop_require_default.js"; | ||
export { _interop_require_wildcard } from "./_interop_require_wildcard.js"; | ||
export { _is_native_function } from "./_is_native_function.js"; | ||
export { _is_native_reflect_construct } from "./_is_native_reflect_construct.js"; | ||
export { _iterable_to_array } from "./_iterable_to_array.js"; | ||
export { _iterable_to_array_limit } from "./_iterable_to_array_limit.js"; | ||
export { _iterable_to_array_limit_loose } from "./_iterable_to_array_limit_loose.js"; | ||
export { _jsx } from "./_jsx.js"; | ||
export { _new_arrow_check } from "./_new_arrow_check.js"; | ||
export { _non_iterable_rest } from "./_non_iterable_rest.js"; | ||
export { _non_iterable_spread } from "./_non_iterable_spread.js"; | ||
export { _object_destructuring_empty } from "./_object_destructuring_empty.js"; | ||
export { _object_spread } from "./_object_spread.js"; | ||
export { _object_spread_props } from "./_object_spread_props.js"; | ||
export { _object_without_properties } from "./_object_without_properties.js"; | ||
export { _object_without_properties_loose } from "./_object_without_properties_loose.js"; | ||
export { _possible_constructor_return } from "./_possible_constructor_return.js"; | ||
export { _read_only_error } from "./_read_only_error.js"; | ||
export { _set } from "./_set.js"; | ||
export { _set_prototype_of } from "./_set_prototype_of.js"; | ||
export { _skip_first_generator_next } from "./_skip_first_generator_next.js"; | ||
export { _sliced_to_array } from "./_sliced_to_array.js"; | ||
export { _sliced_to_array_loose } from "./_sliced_to_array_loose.js"; | ||
export { _super_prop_base } from "./_super_prop_base.js"; | ||
export { _tagged_template_literal } from "./_tagged_template_literal.js"; | ||
export { _tagged_template_literal_loose } from "./_tagged_template_literal_loose.js"; | ||
export { _throw } from "./_throw.js"; | ||
export { _to_array } from "./_to_array.js"; | ||
export { _to_consumable_array } from "./_to_consumable_array.js"; | ||
export { _to_primitive } from "./_to_primitive.js"; | ||
export { _to_property_key } from "./_to_property_key.js"; | ||
export { _ts_decorate } from "./_ts_decorate.js"; | ||
export { _ts_generator } from "./_ts_generator.js"; | ||
export { _ts_metadata } from "./_ts_metadata.js"; | ||
export { _ts_param } from "./_ts_param.js"; | ||
export { _ts_values } from "./_ts_values.js"; | ||
export { _type_of } from "./_type_of.js"; | ||
export { _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; | ||
export { _update } from "./_update.js"; | ||
export { _using } from "./_using.js"; | ||
export { _using_ctx } from "./_using_ctx.js"; | ||
export { _wrap_async_generator } from "./_wrap_async_generator.js"; | ||
export { _wrap_native_super } from "./_wrap_native_super.js"; | ||
export { _write_only_error } from "./_write_only_error.js"; | ||
export { _ as _apply_decorated_descriptor } from "./_apply_decorated_descriptor.js"; | ||
export { _ as _apply_decs_2203_r } from "./_apply_decs_2203_r.js"; | ||
export { _ as _array_like_to_array } from "./_array_like_to_array.js"; | ||
export { _ as _array_with_holes } from "./_array_with_holes.js"; | ||
export { _ as _array_without_holes } from "./_array_without_holes.js"; | ||
export { _ as _assert_this_initialized } from "./_assert_this_initialized.js"; | ||
export { _ as _async_generator } from "./_async_generator.js"; | ||
export { _ as _async_generator_delegate } from "./_async_generator_delegate.js"; | ||
export { _ as _async_iterator } from "./_async_iterator.js"; | ||
export { _ as _async_to_generator } from "./_async_to_generator.js"; | ||
export { _ as _await_async_generator } from "./_await_async_generator.js"; | ||
export { _ as _await_value } from "./_await_value.js"; | ||
export { _ as _check_private_redeclaration } from "./_check_private_redeclaration.js"; | ||
export { _ as _class_apply_descriptor_destructure } from "./_class_apply_descriptor_destructure.js"; | ||
export { _ as _class_apply_descriptor_get } from "./_class_apply_descriptor_get.js"; | ||
export { _ as _class_apply_descriptor_set } from "./_class_apply_descriptor_set.js"; | ||
export { _ as _class_apply_descriptor_update } from "./_class_apply_descriptor_update.js"; | ||
export { _ as _class_call_check } from "./_class_call_check.js"; | ||
export { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; | ||
export { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; | ||
export { _ as _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; | ||
export { _ as _class_name_tdz_error } from "./_class_name_tdz_error.js"; | ||
export { _ as _class_private_field_destructure } from "./_class_private_field_destructure.js"; | ||
export { _ as _class_private_field_get } from "./_class_private_field_get.js"; | ||
export { _ as _class_private_field_init } from "./_class_private_field_init.js"; | ||
export { _ as _class_private_field_loose_base } from "./_class_private_field_loose_base.js"; | ||
export { _ as _class_private_field_loose_key } from "./_class_private_field_loose_key.js"; | ||
export { _ as _class_private_field_set } from "./_class_private_field_set.js"; | ||
export { _ as _class_private_field_update } from "./_class_private_field_update.js"; | ||
export { _ as _class_private_method_get } from "./_class_private_method_get.js"; | ||
export { _ as _class_private_method_init } from "./_class_private_method_init.js"; | ||
export { _ as _class_private_method_set } from "./_class_private_method_set.js"; | ||
export { _ as _class_static_private_field_destructure } from "./_class_static_private_field_destructure.js"; | ||
export { _ as _class_static_private_field_spec_get } from "./_class_static_private_field_spec_get.js"; | ||
export { _ as _class_static_private_field_spec_set } from "./_class_static_private_field_spec_set.js"; | ||
export { _ as _class_static_private_field_update } from "./_class_static_private_field_update.js"; | ||
export { _ as _class_static_private_method_get } from "./_class_static_private_method_get.js"; | ||
export { _ as _construct } from "./_construct.js"; | ||
export { _ as _create_class } from "./_create_class.js"; | ||
export { _ as _create_for_of_iterator_helper_loose } from "./_create_for_of_iterator_helper_loose.js"; | ||
export { _ as _create_super } from "./_create_super.js"; | ||
export { _ as _decorate } from "./_decorate.js"; | ||
export { _ as _defaults } from "./_defaults.js"; | ||
export { _ as _define_enumerable_properties } from "./_define_enumerable_properties.js"; | ||
export { _ as _define_property } from "./_define_property.js"; | ||
export { _ as _dispose } from "./_dispose.js"; | ||
export { _ as _export_star } from "./_export_star.js"; | ||
export { _ as _extends } from "./_extends.js"; | ||
export { _ as _get } from "./_get.js"; | ||
export { _ as _get_prototype_of } from "./_get_prototype_of.js"; | ||
export { _ as _identity } from "./_identity.js"; | ||
export { _ as _inherits } from "./_inherits.js"; | ||
export { _ as _inherits_loose } from "./_inherits_loose.js"; | ||
export { _ as _initializer_define_property } from "./_initializer_define_property.js"; | ||
export { _ as _initializer_warning_helper } from "./_initializer_warning_helper.js"; | ||
export { _ as _instanceof } from "./_instanceof.js"; | ||
export { _ as _interop_require_default } from "./_interop_require_default.js"; | ||
export { _ as _interop_require_wildcard } from "./_interop_require_wildcard.js"; | ||
export { _ as _is_native_function } from "./_is_native_function.js"; | ||
export { _ as _is_native_reflect_construct } from "./_is_native_reflect_construct.js"; | ||
export { _ as _iterable_to_array } from "./_iterable_to_array.js"; | ||
export { _ as _iterable_to_array_limit } from "./_iterable_to_array_limit.js"; | ||
export { _ as _iterable_to_array_limit_loose } from "./_iterable_to_array_limit_loose.js"; | ||
export { _ as _jsx } from "./_jsx.js"; | ||
export { _ as _new_arrow_check } from "./_new_arrow_check.js"; | ||
export { _ as _non_iterable_rest } from "./_non_iterable_rest.js"; | ||
export { _ as _non_iterable_spread } from "./_non_iterable_spread.js"; | ||
export { _ as _object_destructuring_empty } from "./_object_destructuring_empty.js"; | ||
export { _ as _object_spread } from "./_object_spread.js"; | ||
export { _ as _object_spread_props } from "./_object_spread_props.js"; | ||
export { _ as _object_without_properties } from "./_object_without_properties.js"; | ||
export { _ as _object_without_properties_loose } from "./_object_without_properties_loose.js"; | ||
export { _ as _possible_constructor_return } from "./_possible_constructor_return.js"; | ||
export { _ as _read_only_error } from "./_read_only_error.js"; | ||
export { _ as _set } from "./_set.js"; | ||
export { _ as _set_prototype_of } from "./_set_prototype_of.js"; | ||
export { _ as _skip_first_generator_next } from "./_skip_first_generator_next.js"; | ||
export { _ as _sliced_to_array } from "./_sliced_to_array.js"; | ||
export { _ as _sliced_to_array_loose } from "./_sliced_to_array_loose.js"; | ||
export { _ as _super_prop_base } from "./_super_prop_base.js"; | ||
export { _ as _tagged_template_literal } from "./_tagged_template_literal.js"; | ||
export { _ as _tagged_template_literal_loose } from "./_tagged_template_literal_loose.js"; | ||
export { _ as _throw } from "./_throw.js"; | ||
export { _ as _to_array } from "./_to_array.js"; | ||
export { _ as _to_consumable_array } from "./_to_consumable_array.js"; | ||
export { _ as _to_primitive } from "./_to_primitive.js"; | ||
export { _ as _to_property_key } from "./_to_property_key.js"; | ||
export { _ as _ts_decorate } from "./_ts_decorate.js"; | ||
export { _ as _ts_generator } from "./_ts_generator.js"; | ||
export { _ as _ts_metadata } from "./_ts_metadata.js"; | ||
export { _ as _ts_param } from "./_ts_param.js"; | ||
export { _ as _ts_values } from "./_ts_values.js"; | ||
export { _ as _type_of } from "./_type_of.js"; | ||
export { _ as _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; | ||
export { _ as _update } from "./_update.js"; | ||
export { _ as _using } from "./_using.js"; | ||
export { _ as _using_ctx } from "./_using_ctx.js"; | ||
export { _ as _wrap_async_generator } from "./_wrap_async_generator.js"; | ||
export { _ as _wrap_native_super } from "./_wrap_native_super.js"; | ||
export { _ as _write_only_error } from "./_write_only_error.js"; |
{ | ||
"name": "@swc/helpers", | ||
"packageManager": "yarn@4.0.2", | ||
"version": "0.5.11", | ||
"version": "0.5.12", | ||
"description": "External helpers for the swc project.", | ||
@@ -6,0 +6,0 @@ "module": "esm/index.js", |
@@ -11,4 +11,2 @@ import { parseFiles } from "@ast-grep/napi"; | ||
const export_lentgh = "export".length; | ||
export function ast_grep() { | ||
@@ -27,11 +25,6 @@ const task_queue = []; | ||
if (filename.startsWith("_ts")) { | ||
const match = tree.root().find(`export { $NAME as _, $NAME as $ALIAS } from "tslib"`); | ||
const match = tree.root().find(`export { $NAME as _ } from "tslib"`); | ||
if (match) { | ||
const name = match.getMatch("NAME").text(); | ||
const alias = match.getMatch("ALIAS").text(); | ||
if (alias !== filename) { | ||
report_ts_mismatch(tree.filename(), match); | ||
} | ||
const range = match.range(); | ||
@@ -42,3 +35,3 @@ | ||
range.end.index, | ||
`exports._ = exports.${alias} = require("tslib").${name};`, | ||
`exports._ = require("tslib").${name};`, | ||
); | ||
@@ -60,3 +53,3 @@ task_queue.push( | ||
kind: "export_statement", | ||
pattern: "export function $FUNC($$$){$$$}", | ||
pattern: "export { $FUNC as _ }", | ||
}, | ||
@@ -72,11 +65,13 @@ }); | ||
const export_start = match.range().start.index; | ||
const export_end = export_start + export_lentgh; | ||
const range = match.range(); | ||
source.update( | ||
export_start, | ||
export_end, | ||
`exports._ = exports.${func_name} = ${func_name};`, | ||
range.start.index, | ||
range.end.index, | ||
`exports._ = ${func_name};`, | ||
); | ||
match | ||
// since we match the { export x as _ } pattern, | ||
// we need to find the assignment expression from the root | ||
tree | ||
.root() | ||
.findAll({ | ||
@@ -92,17 +87,4 @@ rule: { | ||
source.prependLeft(range.start.index, `exports._ = exports.${func_name} = `); | ||
source.prependLeft(range.start.index, `exports._ = `); | ||
}); | ||
const export_shortname = `export { ${func_name} as _}`; | ||
const export_alias = tree.root().find(export_shortname); | ||
if (!export_alias) { | ||
task_queue.push( | ||
fs.appendFile(tree.filename(), export_shortname, "utf-8"), | ||
); | ||
} else { | ||
const range = export_alias.range(); | ||
source.remove(range.start.index, range.end.index); | ||
} | ||
} else { | ||
@@ -115,3 +97,3 @@ report_noexport(tree.filename(tree.filename())); | ||
.root() | ||
.findAll({ rule: { pattern: `import { $BINDING } from "$SOURCE"` } }) | ||
.findAll({ rule: { pattern: `import { _ as $BINDING } from "$SOURCE"` } }) | ||
.forEach((match) => { | ||
@@ -176,34 +158,2 @@ const import_binding = match.getMatch("BINDING").text(); | ||
*/ | ||
function report_ts_mismatch(filename, match) { | ||
const range = match.getMatch("ALIAS").range(); | ||
errors.push( | ||
[ | ||
`${chalk.bold.red("error")}: mismatch exported function name.`, | ||
"", | ||
`${chalk.blue("-->")} ${filename}:${match.range().start.line + 1}`, | ||
"", | ||
match.text(), | ||
chalk.red( | ||
[ | ||
" ".repeat(range.start.column), | ||
"^".repeat(range.end.column - range.start.column), | ||
] | ||
.join(""), | ||
), | ||
`${ | ||
chalk.bold( | ||
"note:", | ||
) | ||
} The exported name should be the same as the filename.`, | ||
"", | ||
] | ||
.join("\n"), | ||
); | ||
} | ||
/** | ||
* @param {string} filename | ||
* @param {SgNode} match | ||
*/ | ||
function report_export_mismatch(filename, match) { | ||
@@ -210,0 +160,0 @@ const func = match.getMatch("FUNC"); |
@@ -72,3 +72,3 @@ #!/usr/bin/env zx | ||
indexESM.push(`export { ${importBinding} } from "./${importBinding}.js";`); | ||
indexESM.push(`export { _ as ${importBinding} } from "./${importBinding}.js";`); | ||
@@ -75,0 +75,0 @@ cjs_module_lexer.push(`${importBinding}: null,`); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
230582
4688