@tsed/core 6.87.1 → 6.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{decorators → cjs/decorators}/configurable.d.ts +0 -0
- package/lib/cjs/decorators/configurable.js +18 -0
- package/lib/cjs/decorators/configurable.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/deprecated.d.ts +0 -0
- package/lib/cjs/decorators/deprecated.js +43 -0
- package/lib/cjs/decorators/deprecated.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/enumerable.d.ts +0 -0
- package/lib/cjs/decorators/enumerable.js +18 -0
- package/lib/cjs/decorators/enumerable.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/index.d.ts +0 -0
- package/lib/cjs/decorators/index.js +18 -0
- package/lib/cjs/decorators/index.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/notConfigurable.d.ts +0 -0
- package/lib/cjs/decorators/notConfigurable.js +13 -0
- package/lib/cjs/decorators/notConfigurable.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/notEnumerable.d.ts +0 -0
- package/lib/cjs/decorators/notEnumerable.js +13 -0
- package/lib/cjs/decorators/notEnumerable.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/readOnly.d.ts +0 -0
- package/lib/cjs/decorators/readOnly.js +13 -0
- package/lib/cjs/decorators/readOnly.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/storeFn.d.ts +0 -0
- package/lib/cjs/decorators/storeFn.js +22 -0
- package/lib/cjs/decorators/storeFn.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/storeMerge.d.ts +0 -0
- package/lib/cjs/decorators/storeMerge.js +11 -0
- package/lib/cjs/decorators/storeMerge.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/storeSet.d.ts +0 -0
- package/lib/cjs/decorators/storeSet.js +11 -0
- package/lib/cjs/decorators/storeSet.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/writable.d.ts +0 -0
- package/lib/cjs/decorators/writable.js +18 -0
- package/lib/cjs/decorators/writable.js.map +1 -0
- package/lib/{domain → cjs/domain}/AnyToPromise.d.ts +0 -0
- package/lib/cjs/domain/AnyToPromise.js +148 -0
- package/lib/cjs/domain/AnyToPromise.js.map +1 -0
- package/lib/{domain → cjs/domain}/DecoratorTypes.d.ts +0 -0
- package/lib/cjs/domain/DecoratorTypes.js +15 -0
- package/lib/cjs/domain/DecoratorTypes.js.map +1 -0
- package/lib/{domain → cjs/domain}/Env.d.ts +0 -0
- package/lib/cjs/domain/Env.js +19 -0
- package/lib/cjs/domain/Env.js.map +1 -0
- package/lib/{domain → cjs/domain}/Hooks.d.ts +0 -0
- package/lib/cjs/domain/Hooks.js +89 -0
- package/lib/cjs/domain/Hooks.js.map +1 -0
- package/lib/{domain → cjs/domain}/Metadata.d.ts +0 -0
- package/lib/cjs/domain/Metadata.js +508 -0
- package/lib/cjs/domain/Metadata.js.map +1 -0
- package/lib/{domain → cjs/domain}/Store.d.ts +0 -0
- package/lib/cjs/domain/Store.js +157 -0
- package/lib/cjs/domain/Store.js.map +1 -0
- package/lib/{domain → cjs/domain}/Type.d.ts +0 -0
- package/lib/cjs/domain/Type.js +7 -0
- package/lib/cjs/domain/Type.js.map +1 -0
- package/lib/{domain → cjs/domain}/index.d.ts +0 -0
- package/lib/cjs/domain/index.js +11 -0
- package/lib/cjs/domain/index.js.map +1 -0
- package/lib/{errors → cjs/errors}/UnsupportedDecoratorType.d.ts +0 -0
- package/lib/cjs/errors/UnsupportedDecoratorType.js +21 -0
- package/lib/cjs/errors/UnsupportedDecoratorType.js.map +1 -0
- package/lib/{index.d.ts → cjs/index.d.ts} +0 -0
- package/lib/cjs/index.js +9 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/AnyDecorator.d.ts +0 -0
- package/lib/cjs/interfaces/AnyDecorator.js +3 -0
- package/lib/cjs/interfaces/AnyDecorator.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/DecoratorParameters.d.ts +0 -0
- package/lib/cjs/interfaces/DecoratorParameters.js +3 -0
- package/lib/cjs/interfaces/DecoratorParameters.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/HashOf.d.ts +0 -0
- package/lib/cjs/interfaces/HashOf.js +3 -0
- package/lib/cjs/interfaces/HashOf.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/MetadataTypes.d.ts +0 -0
- package/lib/cjs/interfaces/MetadataTypes.js +3 -0
- package/lib/cjs/interfaces/MetadataTypes.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/ValueOf.d.ts +0 -0
- package/lib/cjs/interfaces/ValueOf.js +3 -0
- package/lib/cjs/interfaces/ValueOf.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/index.d.ts +0 -0
- package/lib/cjs/interfaces/index.js +3 -0
- package/lib/cjs/interfaces/index.js.map +1 -0
- package/lib/{utils → cjs/utils}/catchError.d.ts +0 -0
- package/lib/cjs/utils/catchError.js +22 -0
- package/lib/cjs/utils/catchError.js.map +1 -0
- package/lib/{utils → cjs/utils}/decorators/decorateMethodsOf.d.ts +0 -0
- package/lib/cjs/utils/decorators/decorateMethodsOf.js +23 -0
- package/lib/cjs/utils/decorators/decorateMethodsOf.js.map +1 -0
- package/lib/{utils → cjs/utils}/decorators/decoratorArgs.d.ts +0 -0
- package/lib/cjs/utils/decorators/decoratorArgs.js +9 -0
- package/lib/cjs/utils/decorators/decoratorArgs.js.map +1 -0
- package/lib/{utils → cjs/utils}/decorators/decoratorTypeOf.d.ts +0 -0
- package/lib/cjs/utils/decorators/decoratorTypeOf.js +23 -0
- package/lib/cjs/utils/decorators/decoratorTypeOf.js.map +1 -0
- package/lib/{utils → cjs/utils}/decorators/inheritedDescriptorOf.d.ts +0 -0
- package/lib/cjs/utils/decorators/inheritedDescriptorOf.js +15 -0
- package/lib/cjs/utils/decorators/inheritedDescriptorOf.js.map +1 -0
- package/lib/{utils → cjs/utils}/decorators/useDecorators.d.ts +0 -0
- package/lib/cjs/utils/decorators/useDecorators.js +14 -0
- package/lib/cjs/utils/decorators/useDecorators.js.map +1 -0
- package/lib/{utils → cjs/utils}/decorators/useMethodDecorators.d.ts +0 -0
- package/lib/cjs/utils/decorators/useMethodDecorators.js +15 -0
- package/lib/cjs/utils/decorators/useMethodDecorators.js.map +1 -0
- package/lib/{utils → cjs/utils}/imports/importPackage.d.ts +0 -0
- package/lib/cjs/utils/imports/importPackage.js +35 -0
- package/lib/cjs/utils/imports/importPackage.js.map +1 -0
- package/lib/{utils → cjs/utils}/index.d.ts +0 -0
- package/lib/cjs/utils/index.js +18 -0
- package/lib/cjs/utils/index.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/ancestorOf.d.ts +0 -0
- package/lib/cjs/utils/objects/ancestorOf.js +12 -0
- package/lib/cjs/utils/objects/ancestorOf.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/ancestorsOf.d.ts +0 -0
- package/lib/cjs/utils/objects/ancestorsOf.js +22 -0
- package/lib/cjs/utils/objects/ancestorsOf.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/classOf.d.ts +0 -0
- package/lib/cjs/utils/objects/classOf.js +23 -0
- package/lib/cjs/utils/objects/classOf.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/cleanObject.d.ts +0 -0
- package/lib/cjs/utils/objects/cleanObject.js +24 -0
- package/lib/cjs/utils/objects/cleanObject.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/constructorOf.d.ts +0 -0
- package/lib/cjs/utils/objects/constructorOf.js +20 -0
- package/lib/cjs/utils/objects/constructorOf.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/createInstance.d.ts +0 -0
- package/lib/cjs/utils/objects/createInstance.js +9 -0
- package/lib/cjs/utils/objects/createInstance.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/deepClone.d.ts +0 -0
- package/lib/cjs/utils/objects/deepClone.js +57 -0
- package/lib/cjs/utils/objects/deepClone.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/deepExtends.d.ts +0 -0
- package/lib/cjs/utils/objects/deepExtends.js +79 -0
- package/lib/cjs/utils/objects/deepExtends.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/deepMerge.d.ts +0 -0
- package/lib/cjs/utils/objects/deepMerge.js +63 -0
- package/lib/cjs/utils/objects/deepMerge.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/descriptorOf.d.ts +0 -0
- package/lib/cjs/utils/objects/descriptorOf.js +19 -0
- package/lib/cjs/utils/objects/descriptorOf.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/getClassOrSymbol.d.ts +0 -0
- package/lib/cjs/utils/objects/getClassOrSymbol.js +10 -0
- package/lib/cjs/utils/objects/getClassOrSymbol.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/getConstructorArgNames.d.ts +0 -0
- package/lib/cjs/utils/objects/getConstructorArgNames.js +9 -0
- package/lib/cjs/utils/objects/getConstructorArgNames.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/getEnumerableKeys.d.ts +0 -0
- package/lib/cjs/utils/objects/getEnumerableKeys.js +20 -0
- package/lib/cjs/utils/objects/getEnumerableKeys.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/getValue.d.ts +0 -0
- package/lib/cjs/utils/objects/getValue.js +49 -0
- package/lib/cjs/utils/objects/getValue.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/index.d.ts +0 -0
- package/lib/cjs/utils/objects/index.js +47 -0
- package/lib/cjs/utils/objects/index.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isArray.d.ts +0 -0
- package/lib/cjs/utils/objects/isArray.js +23 -0
- package/lib/cjs/utils/objects/isArray.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isArrowFn.d.ts +0 -0
- package/lib/cjs/utils/objects/isArrowFn.js +9 -0
- package/lib/cjs/utils/objects/isArrowFn.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isBoolean.d.ts +0 -0
- package/lib/cjs/utils/objects/isBoolean.js +17 -0
- package/lib/cjs/utils/objects/isBoolean.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isClass.d.ts +0 -0
- package/lib/cjs/utils/objects/isClass.js +26 -0
- package/lib/cjs/utils/objects/isClass.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isCollection.d.ts +0 -0
- package/lib/cjs/utils/objects/isCollection.js +22 -0
- package/lib/cjs/utils/objects/isCollection.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isDate.d.ts +0 -0
- package/lib/cjs/utils/objects/isDate.js +13 -0
- package/lib/cjs/utils/objects/isDate.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isEmpty.d.ts +0 -0
- package/lib/cjs/utils/objects/isEmpty.js +14 -0
- package/lib/cjs/utils/objects/isEmpty.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isEnumerable.d.ts +0 -0
- package/lib/cjs/utils/objects/isEnumerable.js +22 -0
- package/lib/cjs/utils/objects/isEnumerable.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isFunction.d.ts +0 -0
- package/lib/cjs/utils/objects/isFunction.js +8 -0
- package/lib/cjs/utils/objects/isFunction.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isInheritedFrom.d.ts +0 -0
- package/lib/cjs/utils/objects/isInheritedFrom.js +26 -0
- package/lib/cjs/utils/objects/isInheritedFrom.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isNil.d.ts +0 -0
- package/lib/cjs/utils/objects/isNil.js +8 -0
- package/lib/cjs/utils/objects/isNil.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isNumber.d.ts +0 -0
- package/lib/cjs/utils/objects/isNumber.js +17 -0
- package/lib/cjs/utils/objects/isNumber.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isObject.d.ts +0 -0
- package/lib/cjs/utils/objects/isObject.js +8 -0
- package/lib/cjs/utils/objects/isObject.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isObservable.d.ts +0 -0
- package/lib/cjs/utils/objects/isObservable.js +8 -0
- package/lib/cjs/utils/objects/isObservable.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isPlainObject.d.ts +0 -0
- package/lib/cjs/utils/objects/isPlainObject.js +18 -0
- package/lib/cjs/utils/objects/isPlainObject.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isPrimitive.d.ts +0 -0
- package/lib/cjs/utils/objects/isPrimitive.js +30 -0
- package/lib/cjs/utils/objects/isPrimitive.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isPromise.d.ts +0 -0
- package/lib/cjs/utils/objects/isPromise.js +16 -0
- package/lib/cjs/utils/objects/isPromise.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isProtectedKey.d.ts +0 -0
- package/lib/cjs/utils/objects/isProtectedKey.js +12 -0
- package/lib/cjs/utils/objects/isProtectedKey.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isSerializable.d.ts +0 -0
- package/lib/cjs/utils/objects/isSerializable.js +13 -0
- package/lib/cjs/utils/objects/isSerializable.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isStream.d.ts +0 -0
- package/lib/cjs/utils/objects/isStream.js +8 -0
- package/lib/cjs/utils/objects/isStream.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isString.d.ts +0 -0
- package/lib/cjs/utils/objects/isString.js +16 -0
- package/lib/cjs/utils/objects/isString.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/isSymbol.d.ts +0 -0
- package/lib/cjs/utils/objects/isSymbol.js +16 -0
- package/lib/cjs/utils/objects/isSymbol.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/methodsOf.d.ts +0 -0
- package/lib/cjs/utils/objects/methodsOf.js +25 -0
- package/lib/cjs/utils/objects/methodsOf.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/nameOf.d.ts +0 -0
- package/lib/cjs/utils/objects/nameOf.js +32 -0
- package/lib/cjs/utils/objects/nameOf.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/objectKeys.d.ts +0 -0
- package/lib/cjs/utils/objects/objectKeys.js +9 -0
- package/lib/cjs/utils/objects/objectKeys.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/primitiveOf.d.ts +0 -0
- package/lib/cjs/utils/objects/primitiveOf.js +20 -0
- package/lib/cjs/utils/objects/primitiveOf.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/prototypeOf.d.ts +0 -0
- package/lib/cjs/utils/objects/prototypeOf.js +14 -0
- package/lib/cjs/utils/objects/prototypeOf.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/setValue.d.ts +0 -0
- package/lib/cjs/utils/objects/setValue.js +34 -0
- package/lib/cjs/utils/objects/setValue.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/toMap.d.ts +0 -0
- package/lib/cjs/utils/objects/toMap.js +32 -0
- package/lib/cjs/utils/objects/toMap.js.map +1 -0
- package/lib/{utils → cjs/utils}/objects/toStringConstructor.d.ts +0 -0
- package/lib/cjs/utils/objects/toStringConstructor.js +12 -0
- package/lib/cjs/utils/objects/toStringConstructor.js.map +1 -0
- package/lib/{utils → cjs/utils}/proxyDelegation.d.ts +0 -0
- package/lib/cjs/utils/proxyDelegation.js +54 -0
- package/lib/cjs/utils/proxyDelegation.js.map +1 -0
- package/lib/{utils → cjs/utils}/uniq.d.ts +0 -0
- package/lib/cjs/utils/uniq.js +16 -0
- package/lib/cjs/utils/uniq.js.map +1 -0
- package/lib/esm/decorators/configurable.js +14 -0
- package/lib/esm/decorators/configurable.js.map +1 -0
- package/lib/esm/decorators/deprecated.js +39 -0
- package/lib/esm/decorators/deprecated.js.map +1 -0
- package/lib/esm/decorators/enumerable.js +14 -0
- package/lib/esm/decorators/enumerable.js.map +1 -0
- package/lib/esm/decorators/index.js +15 -0
- package/lib/esm/decorators/index.js.map +1 -0
- package/lib/esm/decorators/notConfigurable.js +9 -0
- package/lib/esm/decorators/notConfigurable.js.map +1 -0
- package/lib/esm/decorators/notEnumerable.js +9 -0
- package/lib/esm/decorators/notEnumerable.js.map +1 -0
- package/lib/esm/decorators/readOnly.js +9 -0
- package/lib/esm/decorators/readOnly.js.map +1 -0
- package/lib/esm/decorators/storeFn.js +18 -0
- package/lib/esm/decorators/storeFn.js.map +1 -0
- package/lib/esm/decorators/storeMerge.js +7 -0
- package/lib/esm/decorators/storeMerge.js.map +1 -0
- package/lib/esm/decorators/storeSet.js +7 -0
- package/lib/esm/decorators/storeSet.js.map +1 -0
- package/lib/esm/decorators/writable.js +14 -0
- package/lib/esm/decorators/writable.js.map +1 -0
- package/lib/esm/domain/AnyToPromise.js +144 -0
- package/lib/esm/domain/AnyToPromise.js.map +1 -0
- package/lib/esm/domain/DecoratorTypes.js +12 -0
- package/lib/esm/domain/DecoratorTypes.js.map +1 -0
- package/lib/esm/domain/Env.js +16 -0
- package/lib/esm/domain/Env.js.map +1 -0
- package/lib/esm/domain/Hooks.js +85 -0
- package/lib/esm/domain/Hooks.js.map +1 -0
- package/lib/esm/domain/Metadata.js +504 -0
- package/lib/esm/domain/Metadata.js.map +1 -0
- package/lib/esm/domain/Store.js +153 -0
- package/lib/esm/domain/Store.js.map +1 -0
- package/lib/esm/domain/Type.js +4 -0
- package/lib/esm/domain/Type.js.map +1 -0
- package/lib/esm/domain/index.js +8 -0
- package/lib/esm/domain/index.js.map +1 -0
- package/lib/esm/errors/UnsupportedDecoratorType.js +17 -0
- package/lib/esm/errors/UnsupportedDecoratorType.js.map +1 -0
- package/lib/esm/index.js +6 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/interfaces/AnyDecorator.js +2 -0
- package/lib/esm/interfaces/AnyDecorator.js.map +1 -0
- package/lib/esm/interfaces/DecoratorParameters.js +2 -0
- package/lib/esm/interfaces/DecoratorParameters.js.map +1 -0
- package/lib/esm/interfaces/HashOf.js +2 -0
- package/lib/esm/interfaces/HashOf.js.map +1 -0
- package/lib/esm/interfaces/MetadataTypes.js +2 -0
- package/lib/esm/interfaces/MetadataTypes.js.map +1 -0
- package/lib/esm/interfaces/ValueOf.js +2 -0
- package/lib/esm/interfaces/ValueOf.js.map +1 -0
- package/lib/esm/interfaces/index.js +2 -0
- package/lib/esm/interfaces/index.js.map +1 -0
- package/lib/esm/utils/catchError.js +17 -0
- package/lib/esm/utils/catchError.js.map +1 -0
- package/lib/esm/utils/decorators/decorateMethodsOf.js +19 -0
- package/lib/esm/utils/decorators/decorateMethodsOf.js.map +1 -0
- package/lib/esm/utils/decorators/decoratorArgs.js +5 -0
- package/lib/esm/utils/decorators/decoratorArgs.js.map +1 -0
- package/lib/esm/utils/decorators/decoratorTypeOf.js +19 -0
- package/lib/esm/utils/decorators/decoratorTypeOf.js.map +1 -0
- package/lib/esm/utils/decorators/inheritedDescriptorOf.js +11 -0
- package/lib/esm/utils/decorators/inheritedDescriptorOf.js.map +1 -0
- package/lib/esm/utils/decorators/useDecorators.js +10 -0
- package/lib/esm/utils/decorators/useDecorators.js.map +1 -0
- package/lib/esm/utils/decorators/useMethodDecorators.js +10 -0
- package/lib/esm/utils/decorators/useMethodDecorators.js.map +1 -0
- package/lib/esm/utils/imports/importPackage.js +12 -0
- package/lib/esm/utils/imports/importPackage.js.map +1 -0
- package/lib/esm/utils/index.js +15 -0
- package/lib/esm/utils/index.js.map +1 -0
- package/lib/esm/utils/objects/ancestorOf.js +7 -0
- package/lib/esm/utils/objects/ancestorOf.js.map +1 -0
- package/lib/esm/utils/objects/ancestorsOf.js +18 -0
- package/lib/esm/utils/objects/ancestorsOf.js.map +1 -0
- package/lib/esm/utils/objects/classOf.js +18 -0
- package/lib/esm/utils/objects/classOf.js.map +1 -0
- package/lib/esm/utils/objects/cleanObject.js +20 -0
- package/lib/esm/utils/objects/cleanObject.js.map +1 -0
- package/lib/esm/utils/objects/constructorOf.js +15 -0
- package/lib/esm/utils/objects/constructorOf.js.map +1 -0
- package/lib/esm/utils/objects/createInstance.js +5 -0
- package/lib/esm/utils/objects/createInstance.js.map +1 -0
- package/lib/esm/utils/objects/deepClone.js +53 -0
- package/lib/esm/utils/objects/deepClone.js.map +1 -0
- package/lib/esm/utils/objects/deepExtends.js +75 -0
- package/lib/esm/utils/objects/deepExtends.js.map +1 -0
- package/lib/esm/utils/objects/deepMerge.js +58 -0
- package/lib/esm/utils/objects/deepMerge.js.map +1 -0
- package/lib/esm/utils/objects/descriptorOf.js +14 -0
- package/lib/esm/utils/objects/descriptorOf.js.map +1 -0
- package/lib/esm/utils/objects/getClassOrSymbol.js +6 -0
- package/lib/esm/utils/objects/getClassOrSymbol.js.map +1 -0
- package/lib/esm/utils/objects/getConstructorArgNames.js +5 -0
- package/lib/esm/utils/objects/getConstructorArgNames.js.map +1 -0
- package/lib/esm/utils/objects/getEnumerableKeys.js +16 -0
- package/lib/esm/utils/objects/getEnumerableKeys.js.map +1 -0
- package/lib/esm/utils/objects/getValue.js +45 -0
- package/lib/esm/utils/objects/getValue.js.map +1 -0
- package/lib/esm/utils/objects/index.js +44 -0
- package/lib/esm/utils/objects/index.js.map +1 -0
- package/lib/esm/utils/objects/isArray.js +18 -0
- package/lib/esm/utils/objects/isArray.js.map +1 -0
- package/lib/esm/utils/objects/isArrowFn.js +5 -0
- package/lib/esm/utils/objects/isArrowFn.js.map +1 -0
- package/lib/esm/utils/objects/isBoolean.js +12 -0
- package/lib/esm/utils/objects/isBoolean.js.map +1 -0
- package/lib/esm/utils/objects/isClass.js +22 -0
- package/lib/esm/utils/objects/isClass.js.map +1 -0
- package/lib/esm/utils/objects/isCollection.js +18 -0
- package/lib/esm/utils/objects/isCollection.js.map +1 -0
- package/lib/esm/utils/objects/isDate.js +9 -0
- package/lib/esm/utils/objects/isDate.js.map +1 -0
- package/lib/esm/utils/objects/isEmpty.js +10 -0
- package/lib/esm/utils/objects/isEmpty.js.map +1 -0
- package/lib/esm/utils/objects/isEnumerable.js +18 -0
- package/lib/esm/utils/objects/isEnumerable.js.map +1 -0
- package/lib/esm/utils/objects/isFunction.js +4 -0
- package/lib/esm/utils/objects/isFunction.js.map +1 -0
- package/lib/esm/utils/objects/isInheritedFrom.js +22 -0
- package/lib/esm/utils/objects/isInheritedFrom.js.map +1 -0
- package/lib/esm/utils/objects/isNil.js +4 -0
- package/lib/esm/utils/objects/isNil.js.map +1 -0
- package/lib/esm/utils/objects/isNumber.js +12 -0
- package/lib/esm/utils/objects/isNumber.js.map +1 -0
- package/lib/esm/utils/objects/isObject.js +4 -0
- package/lib/esm/utils/objects/isObject.js.map +1 -0
- package/lib/esm/utils/objects/isObservable.js +4 -0
- package/lib/esm/utils/objects/isObservable.js.map +1 -0
- package/lib/esm/utils/objects/isPlainObject.js +13 -0
- package/lib/esm/utils/objects/isPlainObject.js.map +1 -0
- package/lib/esm/utils/objects/isPrimitive.js +24 -0
- package/lib/esm/utils/objects/isPrimitive.js.map +1 -0
- package/lib/esm/utils/objects/isPromise.js +12 -0
- package/lib/esm/utils/objects/isPromise.js.map +1 -0
- package/lib/esm/utils/objects/isProtectedKey.js +8 -0
- package/lib/esm/utils/objects/isProtectedKey.js.map +1 -0
- package/lib/esm/utils/objects/isSerializable.js +9 -0
- package/lib/esm/utils/objects/isSerializable.js.map +1 -0
- package/lib/esm/utils/objects/isStream.js +4 -0
- package/lib/esm/utils/objects/isStream.js.map +1 -0
- package/lib/esm/utils/objects/isString.js +11 -0
- package/lib/esm/utils/objects/isString.js.map +1 -0
- package/lib/esm/utils/objects/isSymbol.js +11 -0
- package/lib/esm/utils/objects/isSymbol.js.map +1 -0
- package/lib/esm/utils/objects/methodsOf.js +21 -0
- package/lib/esm/utils/objects/methodsOf.js.map +1 -0
- package/lib/esm/utils/objects/nameOf.js +26 -0
- package/lib/esm/utils/objects/nameOf.js.map +1 -0
- package/lib/esm/utils/objects/objectKeys.js +5 -0
- package/lib/esm/utils/objects/objectKeys.js.map +1 -0
- package/lib/esm/utils/objects/primitiveOf.js +16 -0
- package/lib/esm/utils/objects/primitiveOf.js.map +1 -0
- package/lib/esm/utils/objects/prototypeOf.js +10 -0
- package/lib/esm/utils/objects/prototypeOf.js.map +1 -0
- package/lib/esm/utils/objects/setValue.js +30 -0
- package/lib/esm/utils/objects/setValue.js.map +1 -0
- package/lib/esm/utils/objects/toMap.js +28 -0
- package/lib/esm/utils/objects/toMap.js.map +1 -0
- package/lib/esm/utils/objects/toStringConstructor.js +8 -0
- package/lib/esm/utils/objects/toStringConstructor.js.map +1 -0
- package/lib/esm/utils/proxyDelegation.js +50 -0
- package/lib/esm/utils/proxyDelegation.js.map +1 -0
- package/lib/esm/utils/uniq.js +11 -0
- package/lib/esm/utils/uniq.js.map +1 -0
- package/lib/types/decorators/configurable.d.ts +2 -0
- package/lib/types/decorators/deprecated.d.ts +32 -0
- package/lib/types/decorators/enumerable.d.ts +2 -0
- package/lib/types/decorators/index.d.ts +14 -0
- package/lib/types/decorators/notConfigurable.d.ts +2 -0
- package/lib/types/decorators/notEnumerable.d.ts +2 -0
- package/lib/types/decorators/readOnly.d.ts +2 -0
- package/lib/types/decorators/storeFn.d.ts +9 -0
- package/lib/types/decorators/storeMerge.d.ts +1 -0
- package/lib/types/decorators/storeSet.d.ts +1 -0
- package/lib/types/decorators/writable.d.ts +2 -0
- package/lib/types/domain/AnyToPromise.d.ts +42 -0
- package/lib/types/domain/DecoratorTypes.d.ts +10 -0
- package/lib/types/domain/Env.d.ts +13 -0
- package/lib/types/domain/Hooks.d.ts +45 -0
- package/lib/types/domain/Metadata.d.ts +442 -0
- package/lib/types/domain/Store.d.ts +69 -0
- package/lib/types/domain/Type.d.ts +11 -0
- package/lib/types/domain/index.d.ts +7 -0
- package/lib/types/errors/UnsupportedDecoratorType.d.ts +5 -0
- package/lib/types/index.d.ts +6 -0
- package/lib/types/interfaces/AnyDecorator.d.ts +1 -0
- package/lib/types/interfaces/DecoratorParameters.d.ts +3 -0
- package/lib/types/interfaces/HashOf.d.ts +1 -0
- package/lib/types/interfaces/MetadataTypes.d.ts +5 -0
- package/lib/types/interfaces/ValueOf.d.ts +1 -0
- package/lib/types/interfaces/index.d.ts +4 -0
- package/lib/types/utils/catchError.d.ts +2 -0
- package/lib/types/utils/decorators/decorateMethodsOf.d.ts +1 -0
- package/lib/types/utils/decorators/decoratorArgs.d.ts +2 -0
- package/lib/types/utils/decorators/decoratorTypeOf.d.ts +2 -0
- package/lib/types/utils/decorators/inheritedDescriptorOf.d.ts +1 -0
- package/lib/types/utils/decorators/useDecorators.d.ts +2 -0
- package/lib/types/utils/decorators/useMethodDecorators.d.ts +3 -0
- package/lib/types/utils/imports/importPackage.d.ts +1 -0
- package/lib/types/utils/index.d.ts +12 -0
- package/lib/types/utils/objects/ancestorOf.d.ts +2 -0
- package/lib/types/utils/objects/ancestorsOf.d.ts +6 -0
- package/lib/types/utils/objects/classOf.d.ts +13 -0
- package/lib/types/utils/objects/cleanObject.d.ts +6 -0
- package/lib/types/utils/objects/constructorOf.d.ts +11 -0
- package/lib/types/utils/objects/createInstance.d.ts +1 -0
- package/lib/types/utils/objects/deepClone.d.ts +6 -0
- package/lib/types/utils/objects/deepExtends.d.ts +10 -0
- package/lib/types/utils/objects/deepMerge.d.ts +9 -0
- package/lib/types/utils/objects/descriptorOf.d.ts +8 -0
- package/lib/types/utils/objects/getClassOrSymbol.d.ts +1 -0
- package/lib/types/utils/objects/getConstructorArgNames.d.ts +1 -0
- package/lib/types/utils/objects/getEnumerableKeys.d.ts +5 -0
- package/lib/types/utils/objects/getValue.d.ts +32 -0
- package/lib/types/utils/objects/index.d.ts +43 -0
- package/lib/types/utils/objects/isArray.d.ts +13 -0
- package/lib/types/utils/objects/isArrowFn.d.ts +1 -0
- package/lib/types/utils/objects/isBoolean.d.ts +7 -0
- package/lib/types/utils/objects/isClass.d.ts +1 -0
- package/lib/types/utils/objects/isCollection.d.ts +6 -0
- package/lib/types/utils/objects/isDate.d.ts +6 -0
- package/lib/types/utils/objects/isEmpty.d.ts +6 -0
- package/lib/types/utils/objects/isEnumerable.d.ts +6 -0
- package/lib/types/utils/objects/isFunction.d.ts +1 -0
- package/lib/types/utils/objects/isInheritedFrom.d.ts +1 -0
- package/lib/types/utils/objects/isNil.d.ts +1 -0
- package/lib/types/utils/objects/isNumber.d.ts +7 -0
- package/lib/types/utils/objects/isObject.d.ts +1 -0
- package/lib/types/utils/objects/isObservable.d.ts +1 -0
- package/lib/types/utils/objects/isPlainObject.d.ts +7 -0
- package/lib/types/utils/objects/isPrimitive.d.ts +14 -0
- package/lib/types/utils/objects/isPromise.d.ts +7 -0
- package/lib/types/utils/objects/isProtectedKey.d.ts +5 -0
- package/lib/types/utils/objects/isSerializable.d.ts +1 -0
- package/lib/types/utils/objects/isStream.d.ts +1 -0
- package/lib/types/utils/objects/isString.d.ts +6 -0
- package/lib/types/utils/objects/isSymbol.d.ts +6 -0
- package/lib/types/utils/objects/methodsOf.d.ts +5 -0
- package/lib/types/utils/objects/nameOf.d.ts +14 -0
- package/lib/types/utils/objects/objectKeys.d.ts +1 -0
- package/lib/types/utils/objects/primitiveOf.d.ts +1 -0
- package/lib/types/utils/objects/prototypeOf.d.ts +6 -0
- package/lib/types/utils/objects/setValue.d.ts +1 -0
- package/lib/types/utils/objects/toMap.d.ts +3 -0
- package/lib/types/utils/objects/toStringConstructor.d.ts +1 -0
- package/lib/types/utils/proxyDelegation.d.ts +33 -0
- package/lib/types/utils/uniq.d.ts +2 -0
- package/package.json +10 -6
- package/tsconfig.compile.esm.json +23 -0
- package/lib/index.js +0 -2316
- package/lib/index.js.map +0 -1
- package/lib/index.modern.js +0 -2206
- package/lib/index.modern.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isInheritedFrom.js","sourceRoot":"","sources":["../../../../src/utils/objects/isInheritedFrom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAEhC,MAAM,UAAU,eAAe,CAAC,MAAW,EAAE,IAAS,EAAE,IAAI,GAAG,CAAC;IAC9D,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE;QACpB,OAAO,KAAK,CAAC;KACd;IAED,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACzB,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErB,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE;QAC5B,IAAI,CAAC,IAAI,EAAE;YACT,OAAO,KAAK,CAAC;SACd;QACD,IAAI,MAAM,KAAK,IAAI,EAAE;YACnB,OAAO,IAAI,CAAC;SACb;QAED,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;QAC5B,IAAI,EAAE,CAAC;KACR;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import {classOf} from \"./classOf\";\nimport {ancestorOf} from \"./ancestorOf\";\nimport {nameOf} from \"./nameOf\";\n\nexport function isInheritedFrom(target: any, from: any, deep = 5): boolean {\n if (!target || !from) {\n return false;\n }\n\n target = classOf(target);\n from = classOf(from);\n\n while (nameOf(target) !== \"\") {\n if (!deep) {\n return false;\n }\n if (target === from) {\n return true;\n }\n\n target = ancestorOf(target);\n deep--;\n }\n\n return false;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isNil.js","sourceRoot":"","sources":["../../../../src/utils/objects/isNil.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,KAAK,CAAC,KAAU;IAC9B,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AAC/C,CAAC","sourcesContent":["export function isNil(value: any): boolean {\n return value === undefined || value === null;\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param target
|
|
4
|
+
* @returns {boolean}
|
|
5
|
+
*/
|
|
6
|
+
export function isNumber(target) {
|
|
7
|
+
return typeof target === "number";
|
|
8
|
+
}
|
|
9
|
+
export function isNumberOrNumberClass(target) {
|
|
10
|
+
return typeof target === "number" || target instanceof Number || target === Number;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=isNumber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isNumber.js","sourceRoot":"","sources":["../../../../src/utils/objects/isNumber.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAW;IAClC,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAW;IAC/C,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,YAAY,MAAM,IAAI,MAAM,KAAK,MAAM,CAAC;AACrF,CAAC","sourcesContent":["/**\n *\n * @param target\n * @returns {boolean}\n */\nexport function isNumber(target: any): target is number {\n return typeof target === \"number\";\n}\n\nexport function isNumberOrNumberClass(target: any): target is number {\n return typeof target === \"number\" || target instanceof Number || target === Number;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isObject.js","sourceRoot":"","sources":["../../../../src/utils/objects/isObject.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,QAAQ,CAAC,MAAW;IAClC,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC;AACpC,CAAC","sourcesContent":["export function isObject(target: any): target is object {\n return typeof target === \"object\";\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isObservable.js","sourceRoot":"","sources":["../../../../src/utils/objects/isObservable.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY,CAAI,GAAQ;IACtC,OAAO,CAAC,CAAC,GAAG,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,UAAU,IAAI,OAAO,GAAG,CAAC,SAAS,KAAK,UAAU,CAAC;AACxF,CAAC","sourcesContent":["export function isObservable<T>(obj: any): boolean {\n return !!obj && typeof obj.lift === \"function\" && typeof obj.subscribe === \"function\";\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { classOf } from "./classOf";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param target
|
|
5
|
+
* @returns {boolean}
|
|
6
|
+
*/
|
|
7
|
+
export function isClassObject(target) {
|
|
8
|
+
return target === Object;
|
|
9
|
+
}
|
|
10
|
+
export function isPlainObject(target) {
|
|
11
|
+
return isClassObject(classOf(target)) && target !== Object;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=isPlainObject.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isPlainObject.js","sourceRoot":"","sources":["../../../../src/utils/objects/isPlainObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,MAAW;IACvC,OAAO,MAAM,KAAK,MAAM,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,MAAW;IACvC,OAAO,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,MAAM,KAAK,MAAM,CAAC;AAC7D,CAAC","sourcesContent":["import {classOf} from \"./classOf\";\n\n/**\n *\n * @param target\n * @returns {boolean}\n */\nexport function isClassObject(target: any): target is Object {\n return target === Object;\n}\n\nexport function isPlainObject(target: any): boolean {\n return isClassObject(classOf(target)) && target !== Object;\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { isBoolean, isBooleanOrBooleanClass } from "./isBoolean";
|
|
2
|
+
import { isNumber, isNumberOrNumberClass } from "./isNumber";
|
|
3
|
+
import { isString, isStringOrStringClass } from "./isString";
|
|
4
|
+
/**
|
|
5
|
+
* Return true if the given obj is a primitive.
|
|
6
|
+
* @param target
|
|
7
|
+
* @returns {boolean}
|
|
8
|
+
* @ignore
|
|
9
|
+
*/
|
|
10
|
+
export function isPrimitiveOrPrimitiveClass(target) {
|
|
11
|
+
return isStringOrStringClass(target) || isNumberOrNumberClass(target) || isBooleanOrBooleanClass(target);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Return true if the given obj is a primitive.
|
|
15
|
+
* @param target
|
|
16
|
+
* @returns {boolean}
|
|
17
|
+
*/
|
|
18
|
+
export function isPrimitive(target) {
|
|
19
|
+
return isString(target) || isNumber(target) || isBoolean(target);
|
|
20
|
+
}
|
|
21
|
+
export function isPrimitiveClass(target) {
|
|
22
|
+
return [String, Number, Boolean].includes(target);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=isPrimitive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isPrimitive.js","sourceRoot":"","sources":["../../../../src/utils/objects/isPrimitive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAC,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAC,QAAQ,EAAE,qBAAqB,EAAC,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAC,QAAQ,EAAE,qBAAqB,EAAC,MAAM,YAAY,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAAC,MAAW;IACrD,OAAO,qBAAqB,CAAC,MAAM,CAAC,IAAI,qBAAqB,CAAC,MAAM,CAAC,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC;AAC3G,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,MAAW;IACrC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAAW;IAC1C,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC","sourcesContent":["import {isBoolean, isBooleanOrBooleanClass} from \"./isBoolean\";\nimport {isNumber, isNumberOrNumberClass} from \"./isNumber\";\nimport {isString, isStringOrStringClass} from \"./isString\";\n\n/**\n * Return true if the given obj is a primitive.\n * @param target\n * @returns {boolean}\n * @ignore\n */\nexport function isPrimitiveOrPrimitiveClass(target: any): boolean {\n return isStringOrStringClass(target) || isNumberOrNumberClass(target) || isBooleanOrBooleanClass(target);\n}\n\n/**\n * Return true if the given obj is a primitive.\n * @param target\n * @returns {boolean}\n */\nexport function isPrimitive(target: any): boolean {\n return isString(target) || isNumber(target) || isBoolean(target);\n}\n\nexport function isPrimitiveClass(target: any) {\n return [String, Number, Boolean].includes(target);\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests to see if the object is an ES2015 (ES6) Promise
|
|
3
|
+
* @see {@link https://www.ecma-international.org/ecma-262/6.0/#sec-promise-objects}
|
|
4
|
+
* @param target
|
|
5
|
+
* @returns {boolean}
|
|
6
|
+
*/
|
|
7
|
+
export function isPromise(target) {
|
|
8
|
+
return (target === Promise ||
|
|
9
|
+
target instanceof Promise ||
|
|
10
|
+
(!!target && typeof target.subscribe !== "function" && typeof target.then === "function"));
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=isPromise.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isPromise.js","sourceRoot":"","sources":["../../../../src/utils/objects/isPromise.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAU,MAAW;IAC5C,OAAO,CACL,MAAM,KAAK,OAAO;QAClB,MAAM,YAAY,OAAO;QACzB,CAAC,CAAC,CAAC,MAAM,IAAI,OAAO,MAAM,CAAC,SAAS,KAAK,UAAU,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC,CAC1F,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Tests to see if the object is an ES2015 (ES6) Promise\n * @see {@link https://www.ecma-international.org/ecma-262/6.0/#sec-promise-objects}\n * @param target\n * @returns {boolean}\n */\nexport function isPromise<T = any>(target: any): target is Promise<T> {\n return (\n target === Promise ||\n target instanceof Promise ||\n (!!target && typeof target.subscribe !== \"function\" && typeof target.then === \"function\")\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isProtectedKey.js","sourceRoot":"","sources":["../../../../src/utils/objects/isProtectedKey.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,OAAO,CAAC,WAAW,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACjE,CAAC","sourcesContent":["/**\n * Prevent prototype pollution vulnerability\n * @param key\n */\nexport function isProtectedKey(key: string) {\n return [\"__proto__\", \"constructor\", \"prototype\"].includes(key);\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { isStream } from "./isStream";
|
|
2
|
+
import { isBoolean } from "./isBoolean";
|
|
3
|
+
import { isNumber } from "./isNumber";
|
|
4
|
+
import { isString } from "./isString";
|
|
5
|
+
import { isNil } from "./isNil";
|
|
6
|
+
export function isSerializable(data) {
|
|
7
|
+
return !(Buffer.isBuffer(data) || isStream(data) || isBoolean(data) || isNumber(data) || isString(data) || isNil(data));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=isSerializable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSerializable.js","sourceRoot":"","sources":["../../../../src/utils/objects/isSerializable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAE9B,MAAM,UAAU,cAAc,CAAC,IAAS;IACtC,OAAO,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1H,CAAC","sourcesContent":["import {isStream} from \"./isStream\";\nimport {isBoolean} from \"./isBoolean\";\nimport {isNumber} from \"./isNumber\";\nimport {isString} from \"./isString\";\nimport {isNil} from \"./isNil\";\n\nexport function isSerializable(data: any) {\n return !(Buffer.isBuffer(data) || isStream(data) || isBoolean(data) || isNumber(data) || isString(data) || isNil(data));\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isStream.js","sourceRoot":"","sources":["../../../../src/utils/objects/isStream.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,QAAQ,CAAC,GAAQ;IAC/B,OAAO,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,UAAU,CAAC;AACnF,CAAC","sourcesContent":["export function isStream(obj: any): boolean {\n return obj !== null && typeof obj === \"object\" && typeof obj.pipe === \"function\";\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param target
|
|
3
|
+
* @returns {boolean}
|
|
4
|
+
*/
|
|
5
|
+
export function isString(target) {
|
|
6
|
+
return typeof target === "string";
|
|
7
|
+
}
|
|
8
|
+
export function isStringOrStringClass(target) {
|
|
9
|
+
return typeof target === "string" || target instanceof String || target === String;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=isString.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isString.js","sourceRoot":"","sources":["../../../../src/utils/objects/isString.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAW;IAClC,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAW;IAC/C,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,YAAY,MAAM,IAAI,MAAM,KAAK,MAAM,CAAC;AACrF,CAAC","sourcesContent":["/**\n * @param target\n * @returns {boolean}\n */\nexport function isString(target: any): target is string {\n return typeof target === \"string\";\n}\n\nexport function isStringOrStringClass(target: any): target is string {\n return typeof target === \"string\" || target instanceof String || target === String;\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param target
|
|
4
|
+
*/
|
|
5
|
+
export function isSymbol(target) {
|
|
6
|
+
return typeof target === "symbol";
|
|
7
|
+
}
|
|
8
|
+
export function isSymbolOrSymbolClass(target) {
|
|
9
|
+
return typeof target === "symbol" || target instanceof Symbol || target === Symbol;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=isSymbol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSymbol.js","sourceRoot":"","sources":["../../../../src/utils/objects/isSymbol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAW;IAClC,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAW;IAC/C,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,YAAY,MAAM,IAAI,MAAM,KAAK,MAAM,CAAC;AACrF,CAAC","sourcesContent":["/**\n *\n * @param target\n */\nexport function isSymbol(target: any): target is symbol {\n return typeof target === \"symbol\";\n}\n\nexport function isSymbolOrSymbolClass(target: any): target is symbol {\n return typeof target === \"symbol\" || target instanceof Symbol || target === Symbol;\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { classOf } from "./classOf";
|
|
2
|
+
import { ancestorsOf } from "./ancestorsOf";
|
|
3
|
+
import { prototypeOf } from "./prototypeOf";
|
|
4
|
+
/**
|
|
5
|
+
* Return all methods for a given class.
|
|
6
|
+
* @param target
|
|
7
|
+
*/
|
|
8
|
+
export function methodsOf(target) {
|
|
9
|
+
const methods = new Map();
|
|
10
|
+
target = classOf(target);
|
|
11
|
+
ancestorsOf(target).forEach((target) => {
|
|
12
|
+
const keys = Reflect.ownKeys(prototypeOf(target));
|
|
13
|
+
keys.forEach((propertyKey) => {
|
|
14
|
+
if (propertyKey !== "constructor") {
|
|
15
|
+
methods.set(propertyKey, { target, propertyKey });
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
return Array.from(methods.values());
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=methodsOf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"methodsOf.js","sourceRoot":"","sources":["../../../../src/utils/objects/methodsOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,MAAW;IACnC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;IAC1B,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEzB,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACrC,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;QAElD,IAAI,CAAC,OAAO,CAAC,CAAC,WAAmB,EAAE,EAAE;YACnC,IAAI,WAAW,KAAK,aAAa,EAAE;gBACjC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,EAAC,MAAM,EAAE,WAAW,EAAC,CAAC,CAAC;aACjD;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AACtC,CAAC","sourcesContent":["import {classOf} from \"./classOf\";\nimport {ancestorsOf} from \"./ancestorsOf\";\nimport {prototypeOf} from \"./prototypeOf\";\n\n/**\n * Return all methods for a given class.\n * @param target\n */\nexport function methodsOf(target: any) {\n const methods = new Map();\n target = classOf(target);\n\n ancestorsOf(target).forEach((target) => {\n const keys = Reflect.ownKeys(prototypeOf(target));\n\n keys.forEach((propertyKey: string) => {\n if (propertyKey !== \"constructor\") {\n methods.set(propertyKey, {target, propertyKey});\n }\n });\n });\n\n return Array.from(methods.values());\n}\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the provide name.
|
|
3
|
+
* @param targetClass
|
|
4
|
+
*/
|
|
5
|
+
export function nameOfClass(targetClass) {
|
|
6
|
+
return typeof targetClass === "function" ? targetClass.name : targetClass.constructor.name;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Get symbol name.
|
|
10
|
+
* @param sym
|
|
11
|
+
*/
|
|
12
|
+
export const nameOfSymbol = (sym) => sym.toString().replace("Symbol(", "").replace(")", "");
|
|
13
|
+
/**
|
|
14
|
+
* Get object name
|
|
15
|
+
*/
|
|
16
|
+
export function nameOf(obj) {
|
|
17
|
+
switch (typeof obj) {
|
|
18
|
+
default:
|
|
19
|
+
return "" + obj;
|
|
20
|
+
case "symbol":
|
|
21
|
+
return nameOfSymbol(obj);
|
|
22
|
+
case "function":
|
|
23
|
+
return nameOfClass(obj);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=nameOf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nameOf.js","sourceRoot":"","sources":["../../../../src/utils/objects/nameOf.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,WAAgB;IAC1C,OAAO,OAAO,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC;AAC7F,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AAE5G;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,GAAQ;IAC7B,QAAQ,OAAO,GAAG,EAAE;QAClB;YACE,OAAO,EAAE,GAAG,GAAG,CAAC;QAClB,KAAK,QAAQ;YACX,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC;QAC3B,KAAK,UAAU;YACb,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;KAC3B;AACH,CAAC","sourcesContent":["/**\n * Get the provide name.\n * @param targetClass\n */\nexport function nameOfClass(targetClass: any): string {\n return typeof targetClass === \"function\" ? targetClass.name : targetClass.constructor.name;\n}\n\n/**\n * Get symbol name.\n * @param sym\n */\nexport const nameOfSymbol = (sym: symbol): string => sym.toString().replace(\"Symbol(\", \"\").replace(\")\", \"\");\n\n/**\n * Get object name\n */\nexport function nameOf(obj: any): string {\n switch (typeof obj) {\n default:\n return \"\" + obj;\n case \"symbol\":\n return nameOfSymbol(obj);\n case \"function\":\n return nameOfClass(obj);\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objectKeys.js","sourceRoot":"","sources":["../../../../src/utils/objects/objectKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEhD,MAAM,UAAU,UAAU,CAAC,GAAQ;IACjC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AAChE,CAAC","sourcesContent":["import {isProtectedKey} from \"./isProtectedKey\";\n\nexport function objectKeys(obj: any): string[] {\n return Object.keys(obj).filter((key) => !isProtectedKey(key));\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { isBooleanOrBooleanClass } from "./isBoolean";
|
|
2
|
+
import { isNumberOrNumberClass } from "./isNumber";
|
|
3
|
+
import { isStringOrStringClass } from "./isString";
|
|
4
|
+
export function primitiveOf(target) {
|
|
5
|
+
if (isStringOrStringClass(target)) {
|
|
6
|
+
return "string";
|
|
7
|
+
}
|
|
8
|
+
if (isNumberOrNumberClass(target)) {
|
|
9
|
+
return "number";
|
|
10
|
+
}
|
|
11
|
+
if (isBooleanOrBooleanClass(target)) {
|
|
12
|
+
return "boolean";
|
|
13
|
+
}
|
|
14
|
+
return "any";
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=primitiveOf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitiveOf.js","sourceRoot":"","sources":["../../../../src/utils/objects/primitiveOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,uBAAuB,EAAC,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAW,qBAAqB,EAAC,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAW,qBAAqB,EAAC,MAAM,YAAY,CAAC;AAE3D,MAAM,UAAU,WAAW,CAAC,MAAW;IACrC,IAAI,qBAAqB,CAAC,MAAM,CAAC,EAAE;QACjC,OAAO,QAAQ,CAAC;KACjB;IAED,IAAI,qBAAqB,CAAC,MAAM,CAAC,EAAE;QACjC,OAAO,QAAQ,CAAC;KACjB;IAED,IAAI,uBAAuB,CAAC,MAAM,CAAC,EAAE;QACnC,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import {isBoolean, isBooleanOrBooleanClass} from \"./isBoolean\";\nimport {isNumber, isNumberOrNumberClass} from \"./isNumber\";\nimport {isString, isStringOrStringClass} from \"./isString\";\n\nexport function primitiveOf(target: any): \"string\" | \"number\" | \"boolean\" | \"any\" {\n if (isStringOrStringClass(target)) {\n return \"string\";\n }\n\n if (isNumberOrNumberClass(target)) {\n return \"number\";\n }\n\n if (isBooleanOrBooleanClass(target)) {\n return \"boolean\";\n }\n\n return \"any\";\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { classOf } from "./classOf";
|
|
2
|
+
/**
|
|
3
|
+
* Return the prototype of the given class.
|
|
4
|
+
* @param target
|
|
5
|
+
* @returns {any}
|
|
6
|
+
*/
|
|
7
|
+
export function prototypeOf(target) {
|
|
8
|
+
return classOf(target) === target ? target.prototype : target;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=prototypeOf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prototypeOf.js","sourceRoot":"","sources":["../../../../src/utils/objects/prototypeOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,MAAW;IACrC,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;AAChE,CAAC","sourcesContent":["import {classOf} from \"./classOf\";\n\n/**\n * Return the prototype of the given class.\n * @param target\n * @returns {any}\n */\nexport function prototypeOf(target: any) {\n return classOf(target) === target ? target.prototype : target;\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { isProtectedKey } from "./isProtectedKey";
|
|
2
|
+
export function setValue(scope, expression, value, separator = ".") {
|
|
3
|
+
const keys = expression.split(separator);
|
|
4
|
+
const setValue = (key, add) => {
|
|
5
|
+
if (isProtectedKey(key)) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
if (add) {
|
|
9
|
+
if (typeof scope.set === "function") {
|
|
10
|
+
scope.set(key, value);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
scope[key] = value;
|
|
14
|
+
}
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
if (typeof scope.set === "function") {
|
|
18
|
+
if (!scope.has(key)) {
|
|
19
|
+
scope.set(key, {});
|
|
20
|
+
}
|
|
21
|
+
scope = scope.get(key);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
scope = scope[key] = scope[key] || {};
|
|
25
|
+
}
|
|
26
|
+
return true;
|
|
27
|
+
};
|
|
28
|
+
while (setValue(keys.shift(), !keys.length)) { }
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=setValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setValue.js","sourceRoot":"","sources":["../../../../src/utils/objects/setValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEhD,MAAM,UAAU,QAAQ,CAAC,KAAU,EAAE,UAAkB,EAAE,KAAU,EAAE,SAAS,GAAG,GAAG;IAClF,MAAM,IAAI,GAAa,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAEnD,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,GAAY,EAAE,EAAE;QAC7C,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE;YACvB,OAAO,KAAK,CAAC;SACd;QAED,IAAI,GAAG,EAAE;YACP,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,UAAU,EAAE;gBACnC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;aACvB;iBAAM;gBACL,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;aACpB;YAED,OAAO,KAAK,CAAC;SACd;QAED,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,UAAU,EAAE;YACnC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBACnB,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;aACpB;YAED,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;SACxB;aAAM;YACL,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;SACvC;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,GAAE;AAClD,CAAC","sourcesContent":["import {isProtectedKey} from \"./isProtectedKey\";\n\nexport function setValue(scope: any, expression: string, value: any, separator = \".\") {\n const keys: string[] = expression.split(separator);\n\n const setValue = (key: string, add: boolean) => {\n if (isProtectedKey(key)) {\n return false;\n }\n\n if (add) {\n if (typeof scope.set === \"function\") {\n scope.set(key, value);\n } else {\n scope[key] = value;\n }\n\n return false;\n }\n\n if (typeof scope.set === \"function\") {\n if (!scope.has(key)) {\n scope.set(key, {});\n }\n\n scope = scope.get(key);\n } else {\n scope = scope[key] = scope[key] || {};\n }\n\n return true;\n };\n\n while (setValue(keys.shift()!, !keys.length)) {}\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { isArray } from "./isArray";
|
|
2
|
+
import { isString } from "./isString";
|
|
3
|
+
function createIdentityFn(keyOrFn) {
|
|
4
|
+
if (!keyOrFn) {
|
|
5
|
+
return (v, k) => String(k);
|
|
6
|
+
}
|
|
7
|
+
if (isString(keyOrFn)) {
|
|
8
|
+
return (item) => {
|
|
9
|
+
return item[keyOrFn];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
return keyOrFn;
|
|
13
|
+
}
|
|
14
|
+
export function toMap(input, keyOrFn) {
|
|
15
|
+
if (isArray(input)) {
|
|
16
|
+
const identity = createIdentityFn(keyOrFn || "id");
|
|
17
|
+
return input.reduce((map, value, index) => {
|
|
18
|
+
const ids = [].concat(identity(value, index));
|
|
19
|
+
ids.forEach((id) => map.set(id, value));
|
|
20
|
+
return map;
|
|
21
|
+
}, new Map());
|
|
22
|
+
}
|
|
23
|
+
const identity = createIdentityFn(keyOrFn);
|
|
24
|
+
return Object.entries(input).reduce((map, [key, value]) => {
|
|
25
|
+
return map.set(identity(value, key), value);
|
|
26
|
+
}, new Map());
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=toMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toMap.js","sourceRoot":"","sources":["../../../../src/utils/objects/toMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAKpC,SAAS,gBAAgB,CAAI,OAA0B;IACrD,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KAC5B;IAED,IAAI,QAAQ,CAAC,OAAO,CAAC,EAAE;QACrB,OAAO,CAAC,IAAS,EAAE,EAAE;YACnB,OAAO,IAAI,CAAC,OAAiB,CAAC,CAAC;QACjC,CAAC,CAAC;KACH;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,KAAK,CAAqC,KAAyB,EAAE,OAA0B;IAC7G,IAAI,OAAO,CAAI,KAAK,CAAC,EAAE;QACrB,MAAM,QAAQ,GAAG,gBAAgB,CAAI,OAAO,IAAI,IAAI,CAAC,CAAC;QACtD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;YACxC,MAAM,GAAG,GAAI,EAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;YAE5D,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;YAExC,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;KACf;IAED,MAAM,QAAQ,GAAG,gBAAgB,CAAI,OAAO,CAAC,CAAC;IAE9C,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACxD,OAAO,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAU,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;IACnD,CAAC,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;AAChB,CAAC","sourcesContent":["import {isArray} from \"./isArray\";\nimport {isString} from \"./isString\";\n\nexport type ToMapIdentityCB<V> = (item: V, index: string | number) => string | string[];\nexport type ToMapIdentity<V> = string | ToMapIdentityCB<V>;\n\nfunction createIdentityFn<V>(keyOrFn?: ToMapIdentity<V>): ToMapIdentityCB<V> {\n if (!keyOrFn) {\n return (v, k) => String(k);\n }\n\n if (isString(keyOrFn)) {\n return (item: any) => {\n return item[keyOrFn as string];\n };\n }\n\n return keyOrFn;\n}\n\nexport function toMap<K extends keyof any = any, V = any>(input: Record<K, V> | V[], keyOrFn?: ToMapIdentity<V>): Map<K, V> {\n if (isArray<V>(input)) {\n const identity = createIdentityFn<V>(keyOrFn || \"id\");\n return input.reduce((map, value, index) => {\n const ids = ([] as string[]).concat(identity(value, index));\n\n ids.forEach((id) => map.set(id, value));\n\n return map;\n }, new Map());\n }\n\n const identity = createIdentityFn<V>(keyOrFn);\n\n return Object.entries(input).reduce((map, [key, value]) => {\n return map.set(identity(value as V, key), value);\n }, new Map());\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { constructorOf } from "./constructorOf";
|
|
2
|
+
export function toStringConstructor(target) {
|
|
3
|
+
const ctr = constructorOf(target);
|
|
4
|
+
const strings = ctr.toString().split("\n");
|
|
5
|
+
const ctrString = strings.find((s) => s.indexOf("constructor(") > -1) || "constructor()";
|
|
6
|
+
return `${ctrString.replace("{", "").trim()}`;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=toStringConstructor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toStringConstructor.js","sourceRoot":"","sources":["../../../../src/utils/objects/toStringConstructor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,MAAM,UAAU,mBAAmB,CAAC,MAAW;IAC7C,MAAM,GAAG,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IAClC,MAAM,OAAO,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,eAAe,CAAC;IAEzF,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;AAChD,CAAC","sourcesContent":["import {constructorOf} from \"./constructorOf\";\n\nexport function toStringConstructor(target: any): string {\n const ctr = constructorOf(target);\n const strings = ctr.toString().split(\"\\n\");\n const ctrString = strings.find((s) => s.indexOf(\"constructor(\") > -1) || \"constructor()\";\n\n return `${ctrString.replace(\"{\", \"\").trim()}`;\n}\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { uniq } from "./uniq";
|
|
2
|
+
/**
|
|
3
|
+
* Create a complete and iterable trap.
|
|
4
|
+
* @param self
|
|
5
|
+
* @param options
|
|
6
|
+
* @ignore
|
|
7
|
+
*/
|
|
8
|
+
export function proxyDelegation(self, options = {}) {
|
|
9
|
+
const { handlers = {}, remove, ownKeys } = options;
|
|
10
|
+
const get = options.getter || ((target, propertyKey) => target.get(propertyKey));
|
|
11
|
+
const set = options.setter || ((target, propertyKey, value) => !!target.set(propertyKey, value));
|
|
12
|
+
const itsOwnProp = (target, p) => Reflect.has(target, p) || typeof p === "symbol";
|
|
13
|
+
return new Proxy(self, {
|
|
14
|
+
getOwnPropertyDescriptor(target, p) {
|
|
15
|
+
return Reflect.getOwnPropertyDescriptor(target, p);
|
|
16
|
+
},
|
|
17
|
+
has(target, p) {
|
|
18
|
+
if (itsOwnProp(target, p)) {
|
|
19
|
+
return Reflect.has(target, p);
|
|
20
|
+
}
|
|
21
|
+
return get(target, p) !== undefined;
|
|
22
|
+
},
|
|
23
|
+
get(target, p, receiver) {
|
|
24
|
+
if (itsOwnProp(target, p)) {
|
|
25
|
+
return Reflect.get(target, p, receiver);
|
|
26
|
+
}
|
|
27
|
+
return get(target, p);
|
|
28
|
+
},
|
|
29
|
+
set(target, p, value, receiver) {
|
|
30
|
+
if (itsOwnProp(target, p)) {
|
|
31
|
+
return Reflect.set(target, p, value, receiver);
|
|
32
|
+
}
|
|
33
|
+
return !!set(target, p, value, receiver);
|
|
34
|
+
},
|
|
35
|
+
deleteProperty(target, p) {
|
|
36
|
+
if (itsOwnProp(target, p) || !remove) {
|
|
37
|
+
return Reflect.deleteProperty(target, p);
|
|
38
|
+
}
|
|
39
|
+
return remove(target, p);
|
|
40
|
+
},
|
|
41
|
+
defineProperty(target, p, attributes) {
|
|
42
|
+
return Reflect.defineProperty(target, p, attributes);
|
|
43
|
+
},
|
|
44
|
+
ownKeys(target) {
|
|
45
|
+
return uniq(Reflect.ownKeys(target).concat((ownKeys && ownKeys(target)) || []));
|
|
46
|
+
},
|
|
47
|
+
...handlers
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=proxyDelegation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxyDelegation.js","sourceRoot":"","sources":["../../../src/utils/proxyDelegation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAC;AA4B5B;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAyB,IAAS,EAAE,UAA8B,EAAE;IACjG,MAAM,EAAC,QAAQ,GAAG,EAAE,EAAE,MAAM,EAAE,OAAO,EAAC,GAAG,OAAO,CAAC;IACjD,MAAM,GAAG,GAA0B,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,MAAW,EAAE,WAAwB,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC;IAC1H,MAAM,GAAG,GACP,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,MAAW,EAAE,WAAwB,EAAE,KAAU,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC;IAE9G,MAAM,UAAU,GAAG,CAAC,MAAW,EAAE,CAAc,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC;IAEpG,OAAO,IAAI,KAAK,CAAI,IAAI,EAAE;QACxB,wBAAwB,CAAC,MAAW,EAAE,CAAc;YAClD,OAAO,OAAO,CAAC,wBAAwB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACrD,CAAC;QAED,GAAG,CAAC,MAAW,EAAE,CAAc;YAC7B,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE;gBACzB,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;aAC/B;YAED,OAAO,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC;QACtC,CAAC;QAED,GAAG,CAAC,MAAW,EAAE,CAAc,EAAE,QAAa;YAC5C,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE;gBACzB,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;aACzC;YAED,OAAO,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACxB,CAAC;QAED,GAAG,CAAC,MAAW,EAAE,CAAc,EAAE,KAAU,EAAE,QAAa;YACxD,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE;gBACzB,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;aAChD;YAED,OAAO,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,CAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;QAClD,CAAC;QAED,cAAc,CAAC,MAAW,EAAE,CAAc;YACxC,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE;gBACpC,OAAO,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;aAC1C;YAED,OAAO,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAC3B,CAAC;QAED,cAAc,CAAC,MAAW,EAAE,CAAc,EAAE,UAA8B;YACxE,OAAO,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,CAAC,MAAW;YACjB,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAClF,CAAC;QACD,GAAG,QAAQ;KACZ,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {uniq} from \"./uniq\";\n/**\n * @ignore\n */\nexport type ProxyDelegationGetter<T = any> = (target: T, property: PropertyKey) => any | undefined;\n/**\n * @ignore\n */\nexport type ProxyDelegationRemove<T = any> = (target: T, property: PropertyKey) => any;\n/**\n * @ignore\n */\nexport type ProxyDelegationSetter<T = any> = (target: T, property: PropertyKey, value: any, receiver: any) => any;\n/**\n * @ignore\n */\nexport type ProxyDelegationOwnKeys<T = any> = (target: T) => (string | symbol)[];\n/**\n * @ignore\n */\nexport interface ProxyDelegation<T extends object> {\n handlers?: ProxyHandler<T>;\n getter?: ProxyDelegationGetter<T>;\n setter?: ProxyDelegationSetter<T>;\n remove?: ProxyDelegationRemove<T>;\n ownKeys?: ProxyDelegationOwnKeys<T>;\n}\n\n/**\n * Create a complete and iterable trap.\n * @param self\n * @param options\n * @ignore\n */\nexport function proxyDelegation<T extends object = any>(self: any, options: ProxyDelegation<T> = {}) {\n const {handlers = {}, remove, ownKeys} = options;\n const get: ProxyDelegationGetter = options.getter || ((target: any, propertyKey: PropertyKey) => target.get(propertyKey));\n const set: ProxyDelegationSetter =\n options.setter || ((target: any, propertyKey: PropertyKey, value: any) => !!target.set(propertyKey, value));\n\n const itsOwnProp = (target: any, p: PropertyKey) => Reflect.has(target, p) || typeof p === \"symbol\";\n\n return new Proxy<T>(self, {\n getOwnPropertyDescriptor(target: any, p: PropertyKey): PropertyDescriptor | undefined {\n return Reflect.getOwnPropertyDescriptor(target, p);\n },\n\n has(target: any, p: PropertyKey): boolean {\n if (itsOwnProp(target, p)) {\n return Reflect.has(target, p);\n }\n\n return get(target, p) !== undefined;\n },\n\n get(target: any, p: PropertyKey, receiver: any): any {\n if (itsOwnProp(target, p)) {\n return Reflect.get(target, p, receiver);\n }\n\n return get(target, p);\n },\n\n set(target: any, p: PropertyKey, value: any, receiver: any): boolean {\n if (itsOwnProp(target, p)) {\n return Reflect.set(target, p, value, receiver);\n }\n\n return !!set(target, p as any, value, receiver);\n },\n\n deleteProperty(target: any, p: PropertyKey): boolean {\n if (itsOwnProp(target, p) || !remove) {\n return Reflect.deleteProperty(target, p);\n }\n\n return remove(target, p);\n },\n\n defineProperty(target: any, p: PropertyKey, attributes: PropertyDescriptor): boolean {\n return Reflect.defineProperty(target, p, attributes);\n },\n\n ownKeys(target: any) {\n return uniq(Reflect.ownKeys(target).concat((ownKeys && ownKeys(target)) || []));\n },\n ...handlers\n });\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function uniq(list) {
|
|
2
|
+
return Array.from(new Set(list).values());
|
|
3
|
+
}
|
|
4
|
+
export function uniqBy(list, key = "id") {
|
|
5
|
+
const map = new Map();
|
|
6
|
+
list.forEach((item) => {
|
|
7
|
+
map.set(item[key], item);
|
|
8
|
+
});
|
|
9
|
+
return Array.from(map.values());
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=uniq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uniq.js","sourceRoot":"","sources":["../../../src/utils/uniq.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,IAAI,CAAU,IAAS;IACrC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,MAAM,CAAU,IAAS,EAAE,GAAG,GAAG,IAAI;IACnD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;IAEtB,IAAI,CAAC,OAAO,CAAC,CAAC,IAAS,EAAE,EAAE;QACzB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;AAClC,CAAC","sourcesContent":["export function uniq<T = any>(list: T[]): T[] {\n return Array.from(new Set(list).values());\n}\n\nexport function uniqBy<T = any>(list: T[], key = \"id\"): T[] {\n const map = new Map();\n\n list.forEach((item: any) => {\n map.set(item[key], item);\n });\n\n return Array.from(map.values());\n}\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `@Deprecated()` decorators wraps the given method in such a way that it is marked as deprecated.
|
|
3
|
+
*
|
|
4
|
+
* ```typescript
|
|
5
|
+
* provide Foo {
|
|
6
|
+
*
|
|
7
|
+
* @Deprecated("Foo.method: Use Foo.method2 instead")
|
|
8
|
+
* public method() {
|
|
9
|
+
*
|
|
10
|
+
* }
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* When called, @Deprecated() will return a function that will emit a `DeprecationWarning` using the `process.on('warning')` event.
|
|
14
|
+
* By default, this warning will be emitted and printed to `stderr` exactly once, the first time it is called. After the warning is emitted, the wrapped method is called.
|
|
15
|
+
*
|
|
16
|
+
* If either the `--no-deprecation` or `--no-warnings` command line flags are used, or if the `process.noDeprecation`
|
|
17
|
+
* property is set to `true` prior to the first deprecation warning, the `@Deprecated()` decorators does nothing.
|
|
18
|
+
*
|
|
19
|
+
* If the `--trace-deprecation` or `--trace-warnings` command line flags are set, or the `process.traceDeprecation`
|
|
20
|
+
* property is set to `true`, a warning and a stack trace are printed to stderr the first time the deprecated function is called.
|
|
21
|
+
*
|
|
22
|
+
* If the `--throw-deprecation` command line flag is set, or the `process.throwDeprecation` property is set to `true`,
|
|
23
|
+
* then an exception will be thrown when the deprecated function is called.
|
|
24
|
+
*
|
|
25
|
+
* The `--throw-deprecation` command line flag and `process.throwDeprecation` property take precedence over `--trace-deprecation`
|
|
26
|
+
* and `process.traceDeprecation`.
|
|
27
|
+
*
|
|
28
|
+
* @param message
|
|
29
|
+
* @returns {Function}
|
|
30
|
+
* @decorator
|
|
31
|
+
*/
|
|
32
|
+
export declare function Deprecated(message: string): Function;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module common/core
|
|
3
|
+
*/
|
|
4
|
+
/** */
|
|
5
|
+
export * from "./deprecated";
|
|
6
|
+
export * from "./configurable";
|
|
7
|
+
export * from "./enumerable";
|
|
8
|
+
export * from "./writable";
|
|
9
|
+
export * from "./readOnly";
|
|
10
|
+
export * from "./notConfigurable";
|
|
11
|
+
export * from "./notEnumerable";
|
|
12
|
+
export * from "./storeSet";
|
|
13
|
+
export * from "./storeMerge";
|
|
14
|
+
export * from "./storeFn";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Store } from "../domain/Store";
|
|
2
|
+
import { DecoratorParameters } from "../interfaces/DecoratorParameters";
|
|
3
|
+
/**
|
|
4
|
+
* Create a store correctly configured from the parameters given by the decorator.
|
|
5
|
+
* The `fn` can return a decorator that will be initialized with the parameters (target, propertyKey, descriptor).
|
|
6
|
+
* @param {(store: Store, parameters: DecoratorParameters) => void} fn
|
|
7
|
+
* @returns {Function}
|
|
8
|
+
*/
|
|
9
|
+
export declare function StoreFn(fn: (store: Store, parameters: DecoratorParameters) => void): Function;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function StoreMerge(key: any, value: any): Function;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function StoreSet(key: any, value: any): Function;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ignore
|
|
3
|
+
*/
|
|
4
|
+
export declare enum AnyToPromiseStatus {
|
|
5
|
+
PENDING = "PENDING",
|
|
6
|
+
CANCELED = "CANCELED",
|
|
7
|
+
RESOLVED = "RESOLVED",
|
|
8
|
+
REJECTED = "REJECTED"
|
|
9
|
+
}
|
|
10
|
+
export declare enum AnyToPromiseResponseTypes {
|
|
11
|
+
STREAM = "STREAM",
|
|
12
|
+
BUFFER = "BUFFER",
|
|
13
|
+
DATA = "DATA"
|
|
14
|
+
}
|
|
15
|
+
export interface AnyPromiseResult<T = any> {
|
|
16
|
+
state: AnyToPromiseStatus;
|
|
17
|
+
type: AnyToPromiseResponseTypes;
|
|
18
|
+
status?: number;
|
|
19
|
+
headers?: Record<string, any>;
|
|
20
|
+
data: T;
|
|
21
|
+
}
|
|
22
|
+
export declare class AnyToPromise<T = any> {
|
|
23
|
+
#private;
|
|
24
|
+
status: AnyToPromiseStatus;
|
|
25
|
+
args: any[];
|
|
26
|
+
constructor({ hasNextFunction }?: {
|
|
27
|
+
hasNextFunction?: boolean;
|
|
28
|
+
});
|
|
29
|
+
isDone(): boolean;
|
|
30
|
+
get next(): (error?: any) => void;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
call(cb: Function): Promise<AnyPromiseResult<T>>;
|
|
35
|
+
reject(er: any): void;
|
|
36
|
+
resolve(response?: any): void;
|
|
37
|
+
destroy(): void;
|
|
38
|
+
cancel(): any;
|
|
39
|
+
done(status: AnyToPromiseStatus): void;
|
|
40
|
+
handle(process: any, additionalProps?: {}): any;
|
|
41
|
+
protected isCanceledResponse(process: any): boolean;
|
|
42
|
+
}
|