@tsed/core 8.0.0-alpha.1 → 8.0.0-alpha.10
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/browser/core.umd.min.js +1 -1
- package/lib/browser/core.umd.min.js.map +1 -1
- package/lib/esm/decorators/deprecated.js.map +1 -1
- package/lib/esm/decorators/storeFn.js.map +1 -1
- package/lib/esm/domain/AnyToPromise.js.map +1 -1
- package/lib/esm/domain/Hooks.js +1 -4
- package/lib/esm/domain/Hooks.js.map +1 -1
- package/lib/esm/domain/Metadata.js.map +1 -1
- package/lib/esm/domain/Store.js.map +1 -1
- package/lib/esm/utils/catchError.js.map +1 -1
- package/lib/esm/utils/decorators/decorateMethodsOf.js.map +1 -1
- package/lib/esm/utils/decorators/decoratorTypeOf.js.map +1 -1
- package/lib/esm/utils/decorators/inheritedDescriptorOf.js.map +1 -1
- package/lib/esm/utils/http/getHostInfoFromPort.js.map +1 -1
- package/lib/esm/utils/imports/importPackage.js.map +1 -1
- package/lib/esm/utils/objects/ancestorsOf.js +1 -1
- package/lib/esm/utils/objects/ancestorsOf.js.map +1 -1
- package/lib/esm/utils/objects/cleanObject.js.map +1 -1
- package/lib/esm/utils/objects/deepClone.js +2 -2
- package/lib/esm/utils/objects/deepClone.js.map +1 -1
- package/lib/esm/utils/objects/deepMerge.js.map +1 -1
- package/lib/esm/utils/objects/getEnumerableKeys.js.map +1 -1
- package/lib/esm/utils/objects/getValue.js.map +1 -1
- package/lib/esm/utils/objects/isBuffer.js.map +1 -1
- package/lib/esm/utils/objects/isClass.js.map +1 -1
- package/lib/esm/utils/objects/isEnumerable.js.map +1 -1
- package/lib/esm/utils/objects/isInheritedFrom.js +1 -1
- package/lib/esm/utils/objects/isInheritedFrom.js.map +1 -1
- package/lib/esm/utils/objects/isSerializable.js +2 -2
- package/lib/esm/utils/objects/isSerializable.js.map +1 -1
- package/lib/esm/utils/objects/methodsOf.js +1 -1
- package/lib/esm/utils/objects/methodsOf.js.map +1 -1
- package/lib/esm/utils/objects/nameOf.js.map +1 -1
- package/lib/esm/utils/objects/primitiveOf.js.map +1 -1
- package/lib/esm/utils/objects/setValue.js.map +1 -1
- package/lib/esm/utils/objects/toMap.js.map +1 -1
- package/lib/esm/utils/proxyDelegation.js.map +1 -1
- package/lib/types/utils/objects/deepClone.d.ts +1 -1
- package/lib/types/utils/objects/isBuffer.d.ts +2 -1
- package/package.json +14 -15
- package/vitest.config.mts +5 -5
- package/lib/cjs/decorators/configurable.js +0 -14
- package/lib/cjs/decorators/configurable.js.map +0 -1
- package/lib/cjs/decorators/deprecated.js +0 -71
- package/lib/cjs/decorators/deprecated.js.map +0 -1
- package/lib/cjs/decorators/enumerable.js +0 -14
- package/lib/cjs/decorators/enumerable.js.map +0 -1
- package/lib/cjs/decorators/notConfigurable.js +0 -9
- package/lib/cjs/decorators/notConfigurable.js.map +0 -1
- package/lib/cjs/decorators/notEnumerable.js +0 -9
- package/lib/cjs/decorators/notEnumerable.js.map +0 -1
- package/lib/cjs/decorators/readOnly.js +0 -9
- package/lib/cjs/decorators/readOnly.js.map +0 -1
- package/lib/cjs/decorators/storeFn.js +0 -22
- package/lib/cjs/decorators/storeFn.js.map +0 -1
- package/lib/cjs/decorators/storeMerge.js +0 -11
- package/lib/cjs/decorators/storeMerge.js.map +0 -1
- package/lib/cjs/decorators/storeSet.js +0 -11
- package/lib/cjs/decorators/storeSet.js.map +0 -1
- package/lib/cjs/decorators/writable.js +0 -14
- package/lib/cjs/decorators/writable.js.map +0 -1
- package/lib/cjs/domain/AnyToPromise.js +0 -147
- package/lib/cjs/domain/AnyToPromise.js.map +0 -1
- package/lib/cjs/domain/DecoratorTypes.js +0 -15
- package/lib/cjs/domain/DecoratorTypes.js.map +0 -1
- package/lib/cjs/domain/Env.js +0 -19
- package/lib/cjs/domain/Env.js.map +0 -1
- package/lib/cjs/domain/Hooks.js +0 -99
- package/lib/cjs/domain/Hooks.js.map +0 -1
- package/lib/cjs/domain/Metadata.js +0 -508
- package/lib/cjs/domain/Metadata.js.map +0 -1
- package/lib/cjs/domain/Store.js +0 -157
- package/lib/cjs/domain/Store.js.map +0 -1
- package/lib/cjs/domain/Type.js +0 -7
- package/lib/cjs/domain/Type.js.map +0 -1
- package/lib/cjs/errors/UnsupportedDecoratorType.js +0 -23
- package/lib/cjs/errors/UnsupportedDecoratorType.js.map +0 -1
- package/lib/cjs/index.js +0 -90
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/interfaces/AnyDecorator.js +0 -3
- package/lib/cjs/interfaces/AnyDecorator.js.map +0 -1
- package/lib/cjs/interfaces/DecoratorParameters.js +0 -3
- package/lib/cjs/interfaces/DecoratorParameters.js.map +0 -1
- package/lib/cjs/interfaces/MetadataTypes.js +0 -3
- package/lib/cjs/interfaces/MetadataTypes.js.map +0 -1
- package/lib/cjs/interfaces/Relation.js +0 -3
- package/lib/cjs/interfaces/Relation.js.map +0 -1
- package/lib/cjs/interfaces/ValueOf.js +0 -3
- package/lib/cjs/interfaces/ValueOf.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/utils/catchError.js +0 -22
- package/lib/cjs/utils/catchError.js.map +0 -1
- package/lib/cjs/utils/decorators/decorateMethodsOf.js +0 -29
- package/lib/cjs/utils/decorators/decorateMethodsOf.js.map +0 -1
- package/lib/cjs/utils/decorators/decoratorArgs.js +0 -9
- package/lib/cjs/utils/decorators/decoratorArgs.js.map +0 -1
- package/lib/cjs/utils/decorators/decoratorTypeOf.js +0 -23
- package/lib/cjs/utils/decorators/decoratorTypeOf.js.map +0 -1
- package/lib/cjs/utils/decorators/inheritedDescriptorOf.js +0 -15
- package/lib/cjs/utils/decorators/inheritedDescriptorOf.js.map +0 -1
- package/lib/cjs/utils/decorators/useDecorators.js +0 -14
- package/lib/cjs/utils/decorators/useDecorators.js.map +0 -1
- package/lib/cjs/utils/decorators/useMethodDecorators.js +0 -15
- package/lib/cjs/utils/decorators/useMethodDecorators.js.map +0 -1
- package/lib/cjs/utils/getRandomId.js +0 -8
- package/lib/cjs/utils/getRandomId.js.map +0 -1
- package/lib/cjs/utils/http/getHostInfoFromPort.js +0 -21
- package/lib/cjs/utils/http/getHostInfoFromPort.js.map +0 -1
- package/lib/cjs/utils/imports/importPackage.js +0 -39
- package/lib/cjs/utils/imports/importPackage.js.map +0 -1
- package/lib/cjs/utils/objects/ancestorOf.js +0 -12
- package/lib/cjs/utils/objects/ancestorOf.js.map +0 -1
- package/lib/cjs/utils/objects/ancestorsOf.js +0 -22
- package/lib/cjs/utils/objects/ancestorsOf.js.map +0 -1
- package/lib/cjs/utils/objects/classOf.js +0 -23
- package/lib/cjs/utils/objects/classOf.js.map +0 -1
- package/lib/cjs/utils/objects/cleanObject.js +0 -24
- package/lib/cjs/utils/objects/cleanObject.js.map +0 -1
- package/lib/cjs/utils/objects/constructorOf.js +0 -20
- package/lib/cjs/utils/objects/constructorOf.js.map +0 -1
- package/lib/cjs/utils/objects/createInstance.js +0 -9
- package/lib/cjs/utils/objects/createInstance.js.map +0 -1
- package/lib/cjs/utils/objects/deepClone.js +0 -77
- package/lib/cjs/utils/objects/deepClone.js.map +0 -1
- package/lib/cjs/utils/objects/deepMerge.js +0 -63
- package/lib/cjs/utils/objects/deepMerge.js.map +0 -1
- package/lib/cjs/utils/objects/descriptorOf.js +0 -18
- package/lib/cjs/utils/objects/descriptorOf.js.map +0 -1
- package/lib/cjs/utils/objects/getClassOrSymbol.js +0 -10
- package/lib/cjs/utils/objects/getClassOrSymbol.js.map +0 -1
- package/lib/cjs/utils/objects/getConstructorArgNames.js +0 -14
- package/lib/cjs/utils/objects/getConstructorArgNames.js.map +0 -1
- package/lib/cjs/utils/objects/getEnumerableKeys.js +0 -20
- package/lib/cjs/utils/objects/getEnumerableKeys.js.map +0 -1
- package/lib/cjs/utils/objects/getValue.js +0 -49
- package/lib/cjs/utils/objects/getValue.js.map +0 -1
- package/lib/cjs/utils/objects/hasJsonMethod.js +0 -8
- package/lib/cjs/utils/objects/hasJsonMethod.js.map +0 -1
- package/lib/cjs/utils/objects/isArray.js +0 -23
- package/lib/cjs/utils/objects/isArray.js.map +0 -1
- package/lib/cjs/utils/objects/isArrowFn.js +0 -9
- package/lib/cjs/utils/objects/isArrowFn.js.map +0 -1
- package/lib/cjs/utils/objects/isBoolean.js +0 -17
- package/lib/cjs/utils/objects/isBoolean.js.map +0 -1
- package/lib/cjs/utils/objects/isBuffer.js +0 -21
- package/lib/cjs/utils/objects/isBuffer.js.map +0 -1
- package/lib/cjs/utils/objects/isClass.js +0 -28
- package/lib/cjs/utils/objects/isClass.js.map +0 -1
- package/lib/cjs/utils/objects/isCollection.js +0 -22
- package/lib/cjs/utils/objects/isCollection.js.map +0 -1
- package/lib/cjs/utils/objects/isDate.js +0 -13
- package/lib/cjs/utils/objects/isDate.js.map +0 -1
- package/lib/cjs/utils/objects/isEmpty.js +0 -14
- package/lib/cjs/utils/objects/isEmpty.js.map +0 -1
- package/lib/cjs/utils/objects/isEnumerable.js +0 -22
- package/lib/cjs/utils/objects/isEnumerable.js.map +0 -1
- package/lib/cjs/utils/objects/isFunction.js +0 -8
- package/lib/cjs/utils/objects/isFunction.js.map +0 -1
- package/lib/cjs/utils/objects/isInheritedFrom.js +0 -26
- package/lib/cjs/utils/objects/isInheritedFrom.js.map +0 -1
- package/lib/cjs/utils/objects/isMomentObject.js +0 -8
- package/lib/cjs/utils/objects/isMomentObject.js.map +0 -1
- package/lib/cjs/utils/objects/isMongooseObject.js +0 -13
- package/lib/cjs/utils/objects/isMongooseObject.js.map +0 -1
- package/lib/cjs/utils/objects/isNil.js +0 -8
- package/lib/cjs/utils/objects/isNil.js.map +0 -1
- package/lib/cjs/utils/objects/isNumber.js +0 -17
- package/lib/cjs/utils/objects/isNumber.js.map +0 -1
- package/lib/cjs/utils/objects/isObject.js +0 -8
- package/lib/cjs/utils/objects/isObject.js.map +0 -1
- package/lib/cjs/utils/objects/isObservable.js +0 -8
- package/lib/cjs/utils/objects/isObservable.js.map +0 -1
- package/lib/cjs/utils/objects/isPlainObject.js +0 -18
- package/lib/cjs/utils/objects/isPlainObject.js.map +0 -1
- package/lib/cjs/utils/objects/isPrimitive.js +0 -30
- package/lib/cjs/utils/objects/isPrimitive.js.map +0 -1
- package/lib/cjs/utils/objects/isPromise.js +0 -16
- package/lib/cjs/utils/objects/isPromise.js.map +0 -1
- package/lib/cjs/utils/objects/isProtectedKey.js +0 -12
- package/lib/cjs/utils/objects/isProtectedKey.js.map +0 -1
- package/lib/cjs/utils/objects/isRegExp.js +0 -8
- package/lib/cjs/utils/objects/isRegExp.js.map +0 -1
- package/lib/cjs/utils/objects/isSerializable.js +0 -13
- package/lib/cjs/utils/objects/isSerializable.js.map +0 -1
- package/lib/cjs/utils/objects/isStream.js +0 -8
- package/lib/cjs/utils/objects/isStream.js.map +0 -1
- package/lib/cjs/utils/objects/isString.js +0 -16
- package/lib/cjs/utils/objects/isString.js.map +0 -1
- package/lib/cjs/utils/objects/isSymbol.js +0 -16
- package/lib/cjs/utils/objects/isSymbol.js.map +0 -1
- package/lib/cjs/utils/objects/methodsOf.js +0 -25
- package/lib/cjs/utils/objects/methodsOf.js.map +0 -1
- package/lib/cjs/utils/objects/nameOf.js +0 -32
- package/lib/cjs/utils/objects/nameOf.js.map +0 -1
- package/lib/cjs/utils/objects/objectKeys.js +0 -9
- package/lib/cjs/utils/objects/objectKeys.js.map +0 -1
- package/lib/cjs/utils/objects/primitiveOf.js +0 -20
- package/lib/cjs/utils/objects/primitiveOf.js.map +0 -1
- package/lib/cjs/utils/objects/prototypeOf.js +0 -14
- package/lib/cjs/utils/objects/prototypeOf.js.map +0 -1
- package/lib/cjs/utils/objects/setValue.js +0 -34
- package/lib/cjs/utils/objects/setValue.js.map +0 -1
- package/lib/cjs/utils/objects/toMap.js +0 -36
- package/lib/cjs/utils/objects/toMap.js.map +0 -1
- package/lib/cjs/utils/objects/toStringConstructor.js +0 -12
- package/lib/cjs/utils/objects/toStringConstructor.js.map +0 -1
- package/lib/cjs/utils/proxyDelegation.js +0 -54
- package/lib/cjs/utils/proxyDelegation.js.map +0 -1
- package/lib/cjs/utils/uniq.js +0 -19
- package/lib/cjs/utils/uniq.js.map +0 -1
- package/lib/esm/package.json +0 -3
- package/lib/types-esm/decorators/configurable.d.ts +0 -1
- package/lib/types-esm/decorators/deprecated.d.ts +0 -32
- package/lib/types-esm/decorators/enumerable.d.ts +0 -1
- package/lib/types-esm/decorators/notConfigurable.d.ts +0 -1
- package/lib/types-esm/decorators/notEnumerable.d.ts +0 -1
- package/lib/types-esm/decorators/readOnly.d.ts +0 -1
- package/lib/types-esm/decorators/storeFn.d.ts +0 -9
- package/lib/types-esm/decorators/storeMerge.d.ts +0 -1
- package/lib/types-esm/decorators/storeSet.d.ts +0 -1
- package/lib/types-esm/decorators/writable.d.ts +0 -1
- package/lib/types-esm/domain/AnyToPromise.d.ts +0 -42
- package/lib/types-esm/domain/DecoratorTypes.d.ts +0 -10
- package/lib/types-esm/domain/Env.d.ts +0 -13
- package/lib/types-esm/domain/Hooks.d.ts +0 -47
- package/lib/types-esm/domain/Metadata.d.ts +0 -442
- package/lib/types-esm/domain/Store.d.ts +0 -69
- package/lib/types-esm/domain/Type.d.ts +0 -14
- package/lib/types-esm/errors/UnsupportedDecoratorType.d.ts +0 -5
- package/lib/types-esm/index.d.ts +0 -86
- package/lib/types-esm/interfaces/AnyDecorator.d.ts +0 -1
- package/lib/types-esm/interfaces/DecoratorParameters.d.ts +0 -3
- package/lib/types-esm/interfaces/MetadataTypes.d.ts +0 -5
- package/lib/types-esm/interfaces/Relation.d.ts +0 -1
- package/lib/types-esm/interfaces/ValueOf.d.ts +0 -1
- package/lib/types-esm/utils/catchError.d.ts +0 -2
- package/lib/types-esm/utils/decorators/decorateMethodsOf.d.ts +0 -1
- package/lib/types-esm/utils/decorators/decoratorArgs.d.ts +0 -2
- package/lib/types-esm/utils/decorators/decoratorTypeOf.d.ts +0 -2
- package/lib/types-esm/utils/decorators/inheritedDescriptorOf.d.ts +0 -1
- package/lib/types-esm/utils/decorators/useDecorators.d.ts +0 -2
- package/lib/types-esm/utils/decorators/useMethodDecorators.d.ts +0 -3
- package/lib/types-esm/utils/getRandomId.d.ts +0 -1
- package/lib/types-esm/utils/http/getHostInfoFromPort.d.ts +0 -7
- package/lib/types-esm/utils/imports/importPackage.d.ts +0 -1
- package/lib/types-esm/utils/objects/ancestorOf.d.ts +0 -2
- package/lib/types-esm/utils/objects/ancestorsOf.d.ts +0 -6
- package/lib/types-esm/utils/objects/classOf.d.ts +0 -13
- package/lib/types-esm/utils/objects/cleanObject.d.ts +0 -6
- package/lib/types-esm/utils/objects/constructorOf.d.ts +0 -11
- package/lib/types-esm/utils/objects/createInstance.d.ts +0 -1
- package/lib/types-esm/utils/objects/deepClone.d.ts +0 -6
- package/lib/types-esm/utils/objects/deepMerge.d.ts +0 -9
- package/lib/types-esm/utils/objects/descriptorOf.d.ts +0 -8
- package/lib/types-esm/utils/objects/getClassOrSymbol.d.ts +0 -1
- package/lib/types-esm/utils/objects/getConstructorArgNames.d.ts +0 -1
- package/lib/types-esm/utils/objects/getEnumerableKeys.d.ts +0 -5
- package/lib/types-esm/utils/objects/getValue.d.ts +0 -32
- package/lib/types-esm/utils/objects/hasJsonMethod.d.ts +0 -1
- package/lib/types-esm/utils/objects/isArray.d.ts +0 -13
- package/lib/types-esm/utils/objects/isArrowFn.d.ts +0 -1
- package/lib/types-esm/utils/objects/isBoolean.d.ts +0 -7
- package/lib/types-esm/utils/objects/isBuffer.d.ts +0 -8
- package/lib/types-esm/utils/objects/isClass.d.ts +0 -1
- package/lib/types-esm/utils/objects/isCollection.d.ts +0 -6
- package/lib/types-esm/utils/objects/isDate.d.ts +0 -6
- package/lib/types-esm/utils/objects/isEmpty.d.ts +0 -6
- package/lib/types-esm/utils/objects/isEnumerable.d.ts +0 -6
- package/lib/types-esm/utils/objects/isFunction.d.ts +0 -1
- package/lib/types-esm/utils/objects/isInheritedFrom.d.ts +0 -1
- package/lib/types-esm/utils/objects/isMomentObject.d.ts +0 -1
- package/lib/types-esm/utils/objects/isMongooseObject.d.ts +0 -2
- package/lib/types-esm/utils/objects/isNil.d.ts +0 -1
- package/lib/types-esm/utils/objects/isNumber.d.ts +0 -7
- package/lib/types-esm/utils/objects/isObject.d.ts +0 -1
- package/lib/types-esm/utils/objects/isObservable.d.ts +0 -1
- package/lib/types-esm/utils/objects/isPlainObject.d.ts +0 -7
- package/lib/types-esm/utils/objects/isPrimitive.d.ts +0 -14
- package/lib/types-esm/utils/objects/isPromise.d.ts +0 -7
- package/lib/types-esm/utils/objects/isProtectedKey.d.ts +0 -5
- package/lib/types-esm/utils/objects/isRegExp.d.ts +0 -1
- package/lib/types-esm/utils/objects/isSerializable.d.ts +0 -1
- package/lib/types-esm/utils/objects/isStream.d.ts +0 -1
- package/lib/types-esm/utils/objects/isString.d.ts +0 -6
- package/lib/types-esm/utils/objects/isSymbol.d.ts +0 -6
- package/lib/types-esm/utils/objects/methodsOf.d.ts +0 -9
- package/lib/types-esm/utils/objects/nameOf.d.ts +0 -14
- package/lib/types-esm/utils/objects/objectKeys.d.ts +0 -1
- package/lib/types-esm/utils/objects/primitiveOf.d.ts +0 -1
- package/lib/types-esm/utils/objects/prototypeOf.d.ts +0 -6
- package/lib/types-esm/utils/objects/setValue.d.ts +0 -1
- package/lib/types-esm/utils/objects/toMap.d.ts +0 -3
- package/lib/types-esm/utils/objects/toStringConstructor.d.ts +0 -1
- package/lib/types-esm/utils/proxyDelegation.d.ts +0 -33
- package/lib/types-esm/utils/uniq.d.ts +0 -5
- /package/{webpack.config.js → webpack.config.cjs} +0 -0
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare enum DecoratorTypes {
|
|
2
|
-
PARAM = "parameter",
|
|
3
|
-
PARAM_CTOR = "parameter.constructor",
|
|
4
|
-
PARAM_STC = "parameter.static",
|
|
5
|
-
PROP = "property",
|
|
6
|
-
PROP_STC = "property.static",
|
|
7
|
-
METHOD = "method",
|
|
8
|
-
METHOD_STC = "method.static",
|
|
9
|
-
CLASS = "class"
|
|
10
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export declare class Hooks {
|
|
2
|
-
#private;
|
|
3
|
-
has(event: string): boolean;
|
|
4
|
-
/**
|
|
5
|
-
* Listen a hook event
|
|
6
|
-
* @param event
|
|
7
|
-
* @param cb
|
|
8
|
-
*/
|
|
9
|
-
on(event: string, cb: Function): this;
|
|
10
|
-
/**
|
|
11
|
-
* Remove a listener attached to an event
|
|
12
|
-
* @param event
|
|
13
|
-
* @param cb
|
|
14
|
-
*/
|
|
15
|
-
off(event: string, cb: Function): this;
|
|
16
|
-
/**
|
|
17
|
-
* Trigger an event and call listener.
|
|
18
|
-
* @param event
|
|
19
|
-
* @param args
|
|
20
|
-
* @param callThis
|
|
21
|
-
*/
|
|
22
|
-
emit(event: string, args?: any[], callThis?: any): void;
|
|
23
|
-
/**
|
|
24
|
-
* Trigger an event, listener alter given value and return it.
|
|
25
|
-
* @param event
|
|
26
|
-
* @param value
|
|
27
|
-
* @param args
|
|
28
|
-
* @param callThis
|
|
29
|
-
*/
|
|
30
|
-
alter<Arg = any, AlteredArg = Arg>(event: string, value: Arg, args?: any[], callThis?: any): AlteredArg;
|
|
31
|
-
/**
|
|
32
|
-
* Trigger an event and call async listener.
|
|
33
|
-
* @param event
|
|
34
|
-
* @param args
|
|
35
|
-
* @param callThis
|
|
36
|
-
*/
|
|
37
|
-
asyncEmit(event: string, args?: any[], callThis?: any): Promise<void>;
|
|
38
|
-
/**
|
|
39
|
-
* Trigger an event, async listener alter given value and return it.
|
|
40
|
-
* @param event
|
|
41
|
-
* @param value
|
|
42
|
-
* @param args
|
|
43
|
-
* @param callThis
|
|
44
|
-
*/
|
|
45
|
-
asyncAlter<Arg = any, AlteredArg = Arg>(event: string, value: Arg, args?: any[], callThis?: any): Promise<AlteredArg>;
|
|
46
|
-
destroy(): void;
|
|
47
|
-
}
|
|
@@ -1,442 +0,0 @@
|
|
|
1
|
-
import "reflect-metadata";
|
|
2
|
-
/**
|
|
3
|
-
* @stable
|
|
4
|
-
*/
|
|
5
|
-
export declare class Metadata {
|
|
6
|
-
/**
|
|
7
|
-
* Gets the metadata value for the provided metadata key on the target object or its prototype chain.
|
|
8
|
-
* @param key A key used to store and retrieve metadata.
|
|
9
|
-
* @param target The target object on which the metadata is defined.
|
|
10
|
-
* @param propertyKey The property key for the target.
|
|
11
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
12
|
-
* @example
|
|
13
|
-
*
|
|
14
|
-
* ```typescript
|
|
15
|
-
* class Example {
|
|
16
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
17
|
-
* // static staticProperty;
|
|
18
|
-
* // property;
|
|
19
|
-
*
|
|
20
|
-
* static staticMethod(p) { }
|
|
21
|
-
* method(p) { }
|
|
22
|
-
* }
|
|
23
|
-
*
|
|
24
|
-
* // constructor
|
|
25
|
-
* result = Metadata.get("custom:annotation", Example);
|
|
26
|
-
*
|
|
27
|
-
* // property (on constructor)
|
|
28
|
-
* result = Metadata.get("custom:annotation", Example, "staticProperty");
|
|
29
|
-
*
|
|
30
|
-
* // property (on prototype)
|
|
31
|
-
* result = Metadata.get("custom:annotation", Example.prototype, "property");
|
|
32
|
-
*
|
|
33
|
-
* // method (on constructor)
|
|
34
|
-
* result = Metadata.get("custom:annotation", Example, "staticMethod");
|
|
35
|
-
*
|
|
36
|
-
* // method (on prototype)
|
|
37
|
-
* result = Metadata.get("custom:annotation", Example.prototype, "method");
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
static get(key: string, target: any, propertyKey?: string | symbol): any;
|
|
42
|
-
/**
|
|
43
|
-
* Gets the metadata value for the provided metadata key on the target object or its prototype chain.
|
|
44
|
-
* @param key A key used to store and retrieve metadata.
|
|
45
|
-
* @param target The target object on which the metadata is defined.
|
|
46
|
-
* @param propertyKey The property key for the target.
|
|
47
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
48
|
-
* @example
|
|
49
|
-
*
|
|
50
|
-
* ```typescript
|
|
51
|
-
* class Example {
|
|
52
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
53
|
-
* // static staticProperty;
|
|
54
|
-
* // property;
|
|
55
|
-
*
|
|
56
|
-
* static staticMethod(p) { }
|
|
57
|
-
* method(p) { }
|
|
58
|
-
* }
|
|
59
|
-
*
|
|
60
|
-
* // constructor
|
|
61
|
-
* result = Metadata.getOwn("custom:annotation", Example);
|
|
62
|
-
*
|
|
63
|
-
* // property (on constructor)
|
|
64
|
-
* result = Metadata.getOwn("custom:annotation", Example, "staticProperty");
|
|
65
|
-
*
|
|
66
|
-
* // property (on prototype)
|
|
67
|
-
* result = Metadata.getOwn("custom:annotation", Example.prototype, "property");
|
|
68
|
-
*
|
|
69
|
-
* // method (on constructor)
|
|
70
|
-
* result = Metadata.getOwn("custom:annotation", Example, "staticMethod");
|
|
71
|
-
*
|
|
72
|
-
* // method (on prototype)
|
|
73
|
-
* result = Metadata.getOwn("custom:annotation", Example.prototype, "method");
|
|
74
|
-
* ```
|
|
75
|
-
*
|
|
76
|
-
*/
|
|
77
|
-
static getOwn(key: string, target: any, propertyKey?: string | symbol): any;
|
|
78
|
-
/**
|
|
79
|
-
* Gets the metadata value for the provided metadata DESIGN_TYPE on the target object or its prototype chain.
|
|
80
|
-
* @param target The target object on which the metadata is defined.
|
|
81
|
-
* @param propertyKey The property key for the target.
|
|
82
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
83
|
-
* @example
|
|
84
|
-
*
|
|
85
|
-
* ```typescript
|
|
86
|
-
* class Example {
|
|
87
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
88
|
-
* // static staticProperty;
|
|
89
|
-
* // property;
|
|
90
|
-
*
|
|
91
|
-
* static staticMethod(p) { }
|
|
92
|
-
* method(p) { }
|
|
93
|
-
* }
|
|
94
|
-
*
|
|
95
|
-
* // on contructor
|
|
96
|
-
* result = Metadata.getType(Example);
|
|
97
|
-
*
|
|
98
|
-
* // property (on constructor)
|
|
99
|
-
* result = Metadata.getType(Example, "staticProperty");
|
|
100
|
-
*
|
|
101
|
-
* // method (on constructor)
|
|
102
|
-
* result = Metadata.getType(Example, "staticMethod");
|
|
103
|
-
* ```
|
|
104
|
-
*
|
|
105
|
-
*/
|
|
106
|
-
static getType(target: any, propertyKey?: string | symbol): any;
|
|
107
|
-
/**
|
|
108
|
-
* Gets the metadata value for the provided metadata DESIGN_TYPE on the target object or its prototype chain.
|
|
109
|
-
* @param target The target object on which the metadata is defined.
|
|
110
|
-
* @param propertyKey The property key for the target.
|
|
111
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
112
|
-
* @example
|
|
113
|
-
*
|
|
114
|
-
* ```typescript
|
|
115
|
-
* class Example {
|
|
116
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
117
|
-
* // static staticProperty;
|
|
118
|
-
* // property;
|
|
119
|
-
*
|
|
120
|
-
* static staticMethod(p) { }
|
|
121
|
-
* method(p) { }
|
|
122
|
-
* }
|
|
123
|
-
*
|
|
124
|
-
* // on contructor
|
|
125
|
-
* result = Metadata.getOwnType(Example);
|
|
126
|
-
*
|
|
127
|
-
* // property (on constructor)
|
|
128
|
-
* result = Metadata.getOwnType(Example, "staticProperty");
|
|
129
|
-
*
|
|
130
|
-
* // method (on constructor)
|
|
131
|
-
* result = Metadata.getOwnType(Example, "staticMethod");
|
|
132
|
-
* ```
|
|
133
|
-
*
|
|
134
|
-
*/
|
|
135
|
-
static getOwnType(target: any, propertyKey?: string | symbol): any;
|
|
136
|
-
/**
|
|
137
|
-
* Gets the metadata value for the provided metadata DESIGN_RETURN_TYPE on the target object or its prototype chain.
|
|
138
|
-
* @param target The target object on which the metadata is defined.
|
|
139
|
-
* @param propertyKey The property key for the target.
|
|
140
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
141
|
-
* @example
|
|
142
|
-
*
|
|
143
|
-
* ```typescript
|
|
144
|
-
* class Example {
|
|
145
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
146
|
-
* // static staticProperty;
|
|
147
|
-
* // property;
|
|
148
|
-
*
|
|
149
|
-
* static staticMethod(p) { }
|
|
150
|
-
* method(p) { }
|
|
151
|
-
* }
|
|
152
|
-
*
|
|
153
|
-
* // on contructor
|
|
154
|
-
* result = Metadata.getReturnType(Example);
|
|
155
|
-
*
|
|
156
|
-
* // property (on constructor)
|
|
157
|
-
* result = Metadata.getReturnType(Example, "staticProperty");
|
|
158
|
-
*
|
|
159
|
-
* // method (on constructor)
|
|
160
|
-
* result = Metadata.getReturnType(Example, "staticMethod");
|
|
161
|
-
* ```
|
|
162
|
-
*
|
|
163
|
-
*/
|
|
164
|
-
static getReturnType(target: any, propertyKey?: string | symbol): any;
|
|
165
|
-
/**
|
|
166
|
-
* Gets the metadata value for the provided metadata DESIGN_RETURN_TYPE on the target object or its prototype chain.
|
|
167
|
-
* @param target The target object on which the metadata is defined.
|
|
168
|
-
* @param propertyKey The property key for the target.
|
|
169
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
170
|
-
* @example
|
|
171
|
-
*
|
|
172
|
-
* ```typescript
|
|
173
|
-
* class Example {
|
|
174
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
175
|
-
* // static staticProperty;
|
|
176
|
-
* // property;
|
|
177
|
-
*
|
|
178
|
-
* static staticMethod(p) { }
|
|
179
|
-
* method(p) { }
|
|
180
|
-
* }
|
|
181
|
-
*
|
|
182
|
-
* // on contructor
|
|
183
|
-
* result = Metadata.getOwnReturnType(Example);
|
|
184
|
-
*
|
|
185
|
-
* // property (on constructor)
|
|
186
|
-
* result = Metadata.getOwnReturnType(Example, "staticProperty");
|
|
187
|
-
*
|
|
188
|
-
* // method (on constructor)
|
|
189
|
-
* result = Metadata.getOwnReturnType(Example, "staticMethod");
|
|
190
|
-
* ```
|
|
191
|
-
*
|
|
192
|
-
*/
|
|
193
|
-
static getOwnReturnType(target: any, propertyKey?: string | symbol): any;
|
|
194
|
-
/**
|
|
195
|
-
* Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
|
|
196
|
-
* @param key A key used to store and retrieve metadata.
|
|
197
|
-
* @param target The target object on which the metadata is defined.
|
|
198
|
-
* @param propertyKey The property key for the target.
|
|
199
|
-
* @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
|
|
200
|
-
* @example
|
|
201
|
-
*
|
|
202
|
-
* ```typescript
|
|
203
|
-
* class Example {
|
|
204
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
205
|
-
* // static staticProperty;
|
|
206
|
-
* // property;
|
|
207
|
-
*
|
|
208
|
-
* static staticMethod(p) { }
|
|
209
|
-
* method(p) { }
|
|
210
|
-
* }
|
|
211
|
-
*
|
|
212
|
-
* // constructor
|
|
213
|
-
* result = Metadata.has("custom:annotation", Example);
|
|
214
|
-
*
|
|
215
|
-
* // property (on constructor)
|
|
216
|
-
* result = Metadata.has("custom:annotation", Example, "staticProperty");
|
|
217
|
-
*
|
|
218
|
-
* // property (on prototype)
|
|
219
|
-
* result = Metadata.has("custom:annotation", Example.prototype, "property");
|
|
220
|
-
*
|
|
221
|
-
* // method (on constructor)
|
|
222
|
-
* result = Metadata.has("custom:annotation", Example, "staticMethod");
|
|
223
|
-
*
|
|
224
|
-
* // method (on prototype)
|
|
225
|
-
* result = Metadata.has("custom:annotation", Example.prototype, "method");
|
|
226
|
-
* ```
|
|
227
|
-
*
|
|
228
|
-
*/
|
|
229
|
-
static has(key: string, target: any, propertyKey?: string | symbol): boolean;
|
|
230
|
-
/**
|
|
231
|
-
* Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
|
|
232
|
-
* @param key A key used to store and retrieve metadata.
|
|
233
|
-
* @param target The target object on which the metadata is defined.
|
|
234
|
-
* @param propertyKey The property key for the target.
|
|
235
|
-
* @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
|
|
236
|
-
* @example
|
|
237
|
-
*
|
|
238
|
-
* ```typescript
|
|
239
|
-
* class Example {
|
|
240
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
241
|
-
* // static staticProperty;
|
|
242
|
-
* // property;
|
|
243
|
-
*
|
|
244
|
-
* static staticMethod(p) { }
|
|
245
|
-
* method(p) { }
|
|
246
|
-
* }
|
|
247
|
-
*
|
|
248
|
-
* // constructor
|
|
249
|
-
* result = Metadata.has("custom:annotation", Example);
|
|
250
|
-
*
|
|
251
|
-
* // property (on constructor)
|
|
252
|
-
* result = Metadata.hasOwn("custom:annotation", Example, "staticProperty");
|
|
253
|
-
*
|
|
254
|
-
* // property (on prototype)
|
|
255
|
-
* result = Metadata.hasOwn("custom:annotation", Example.prototype, "property");
|
|
256
|
-
*
|
|
257
|
-
* // method (on constructor)
|
|
258
|
-
* result = Metadata.hasOwn("custom:annotation", Example, "staticMethod");
|
|
259
|
-
*
|
|
260
|
-
* // method (on prototype)
|
|
261
|
-
* result = Metadata.hasOwn("custom:annotation", Example.prototype, "method");
|
|
262
|
-
* ```
|
|
263
|
-
*
|
|
264
|
-
*/
|
|
265
|
-
static hasOwn(key: string, target: any, propertyKey?: string | symbol): boolean;
|
|
266
|
-
/**
|
|
267
|
-
* Deletes the metadata entry from the target object with the provided key.
|
|
268
|
-
* @param key A key used to store and retrieve metadata.
|
|
269
|
-
* @param target The target object on which the metadata is defined.
|
|
270
|
-
* @param propertyKey The property key for the target.
|
|
271
|
-
* @returns `true` if the metadata entry was found and deleted; otherwise, false.
|
|
272
|
-
* @example
|
|
273
|
-
*
|
|
274
|
-
* ```typescript
|
|
275
|
-
* class Example {
|
|
276
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
277
|
-
* // static staticProperty;
|
|
278
|
-
* // property;
|
|
279
|
-
*
|
|
280
|
-
* static staticMethod(p) { }
|
|
281
|
-
* method(p) { }
|
|
282
|
-
* }
|
|
283
|
-
*
|
|
284
|
-
* // constructor
|
|
285
|
-
* result = Metadata.delete("custom:annotation", Example);
|
|
286
|
-
*
|
|
287
|
-
* // property (on constructor)
|
|
288
|
-
* result = Metadata.delete("custom:annotation", Example, "staticProperty");
|
|
289
|
-
*
|
|
290
|
-
* // property (on prototype)
|
|
291
|
-
* result = Metadata.delete("custom:annotation", Example.prototype, "property");
|
|
292
|
-
*
|
|
293
|
-
* // method (on constructor)
|
|
294
|
-
* result = Metadata.delete("custom:annotation", Example, "staticMethod");
|
|
295
|
-
*
|
|
296
|
-
* // method (on prototype)
|
|
297
|
-
* result = Metadata.delete("custom:annotation", Example.prototype, "method");
|
|
298
|
-
* ```
|
|
299
|
-
*
|
|
300
|
-
*/
|
|
301
|
-
static delete(key: string, target: any, propertyKey?: string | symbol): boolean;
|
|
302
|
-
/**
|
|
303
|
-
* Set the metadata value for the provided metadata DESIGN_PARAM_TYPES on the target object or its prototype chain.
|
|
304
|
-
* @param target The target object on which the metadata is defined.
|
|
305
|
-
* @param propertyKey The property key for the target.
|
|
306
|
-
* @param value A value that contains attached metadata.
|
|
307
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
308
|
-
* @example
|
|
309
|
-
*
|
|
310
|
-
* ```typescript
|
|
311
|
-
* class Example {
|
|
312
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
313
|
-
* // static staticProperty;
|
|
314
|
-
* // property;
|
|
315
|
-
*
|
|
316
|
-
* static staticMethod(p) { }
|
|
317
|
-
* method(p) { }
|
|
318
|
-
* }
|
|
319
|
-
*
|
|
320
|
-
* // on contructor
|
|
321
|
-
* result = Metadata.setParamTypes(Example, undefined, [Object]);
|
|
322
|
-
*
|
|
323
|
-
* // property (on constructor)
|
|
324
|
-
* result = Metadata.setParamTypes(Example, "staticProperty", [Object]);
|
|
325
|
-
*
|
|
326
|
-
* // property (on prototype)
|
|
327
|
-
* result = Metadata.setParamTypes(Example.prototype, "property", [Object]);
|
|
328
|
-
*
|
|
329
|
-
* // method (on constructor)
|
|
330
|
-
* result = Metadata.setParamTypes(Example, "staticMethod", [Object]);
|
|
331
|
-
*
|
|
332
|
-
* // method (on prototype)
|
|
333
|
-
* result = Metadata.setParamTypes(Example.prototype, "method", [Object]);
|
|
334
|
-
* ```
|
|
335
|
-
*
|
|
336
|
-
*/
|
|
337
|
-
static setParamTypes(target: any, propertyKey: string | symbol, value: any): void;
|
|
338
|
-
/**
|
|
339
|
-
* Get all metadata for a metadataKey.
|
|
340
|
-
* @param metadataKey
|
|
341
|
-
*/
|
|
342
|
-
static getTargetsFromPropertyKey: (metadataKey: string | symbol) => any[];
|
|
343
|
-
/**
|
|
344
|
-
* Define a unique metadata entry on the target.
|
|
345
|
-
* @param key A key used to store and retrieve metadata.
|
|
346
|
-
* @param value A value that contains attached metadata.
|
|
347
|
-
* @param target The target object on which to define metadata.
|
|
348
|
-
* @param propertyKey The property key for the target.
|
|
349
|
-
* @example
|
|
350
|
-
*
|
|
351
|
-
* ```typescript
|
|
352
|
-
* class Example {
|
|
353
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
354
|
-
* // static staticProperty;
|
|
355
|
-
* // property;
|
|
356
|
-
*
|
|
357
|
-
* static staticMethod(p) { }
|
|
358
|
-
* method(p) { }
|
|
359
|
-
* }
|
|
360
|
-
*
|
|
361
|
-
* // constructor
|
|
362
|
-
* Reflect.defineMetadata("custom:annotation", options, Example);
|
|
363
|
-
*
|
|
364
|
-
* // property (on constructor)
|
|
365
|
-
* Reflect.defineMetadata("custom:annotation", Number, Example, "staticProperty");
|
|
366
|
-
*
|
|
367
|
-
* // property (on prototype)
|
|
368
|
-
* Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "property");
|
|
369
|
-
*
|
|
370
|
-
* // method (on constructor)
|
|
371
|
-
* Reflect.defineMetadata("custom:annotation", Number, Example, "staticMethod");
|
|
372
|
-
*
|
|
373
|
-
* // method (on prototype)
|
|
374
|
-
* Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "method");
|
|
375
|
-
*
|
|
376
|
-
* // decorator factory as metadata-producing annotation.
|
|
377
|
-
* function MyAnnotation(options): PropertyDecorator {
|
|
378
|
-
* return (target, key) => Reflect.defineMetadata("custom:annotation", options, target, key);
|
|
379
|
-
* }
|
|
380
|
-
* ```
|
|
381
|
-
*
|
|
382
|
-
*/
|
|
383
|
-
static set(key: string, value: any, target: any, propertyKey?: string | symbol): void;
|
|
384
|
-
/**
|
|
385
|
-
* Gets the metadata value for the provided metadata DESIGN_PARAM_TYPES on the target object or its prototype chain.
|
|
386
|
-
* @param targetPrototype
|
|
387
|
-
* @param propertyKey The property key for the target.
|
|
388
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
389
|
-
* @example
|
|
390
|
-
*
|
|
391
|
-
* ```typescript
|
|
392
|
-
* class Example {
|
|
393
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
394
|
-
* // static staticProperty;
|
|
395
|
-
* // property;
|
|
396
|
-
*
|
|
397
|
-
* static staticMethod(p) { }
|
|
398
|
-
* method(p) { }
|
|
399
|
-
* }
|
|
400
|
-
*
|
|
401
|
-
* // on contructor
|
|
402
|
-
* result = Metadata.getParamTypes(Example.prototype);
|
|
403
|
-
*
|
|
404
|
-
* // property (on constructor)
|
|
405
|
-
* result = Metadata.getParamTypes(Example.prototype, "staticProperty");
|
|
406
|
-
*
|
|
407
|
-
* // method (on constructor)
|
|
408
|
-
* result = Metadata.getParamTypes(Example.prototype, "staticMethod");
|
|
409
|
-
* ```
|
|
410
|
-
*
|
|
411
|
-
*/
|
|
412
|
-
static getParamTypes(targetPrototype: any, propertyKey?: string | symbol): any[];
|
|
413
|
-
/**
|
|
414
|
-
* Gets the metadata value for the provided metadata DESIGN_PARAM_TYPES on the target object or its prototype chain.
|
|
415
|
-
* @param target The target object on which the metadata is defined.
|
|
416
|
-
* @param propertyKey The property key for the target.
|
|
417
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
418
|
-
* @example
|
|
419
|
-
*
|
|
420
|
-
* ```typescript
|
|
421
|
-
* class Example {
|
|
422
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
423
|
-
* // static staticProperty;
|
|
424
|
-
* // property;
|
|
425
|
-
*
|
|
426
|
-
* static staticMethod(p) { }
|
|
427
|
-
* method(p) { }
|
|
428
|
-
* }
|
|
429
|
-
*
|
|
430
|
-
* // on contructor
|
|
431
|
-
* result = Metadata.getParamTypes(Example);
|
|
432
|
-
*
|
|
433
|
-
* // property (on constructor)
|
|
434
|
-
* result = Metadata.getParamTypes(Example, "staticProperty");
|
|
435
|
-
*
|
|
436
|
-
* // method (on constructor)
|
|
437
|
-
* result = Metadata.getParamTypes(Example, "staticMethod");
|
|
438
|
-
* ```
|
|
439
|
-
*
|
|
440
|
-
*/
|
|
441
|
-
static getOwnParamTypes(target: any, propertyKey?: string | symbol): any[];
|
|
442
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { Type } from "./Type.js";
|
|
2
|
-
/**
|
|
3
|
-
* @ignore
|
|
4
|
-
*/
|
|
5
|
-
export declare const CLASS_STORE = "tsed:class:store";
|
|
6
|
-
/**
|
|
7
|
-
* @ignore
|
|
8
|
-
*/
|
|
9
|
-
export declare const METHOD_STORE = "tsed:method:store";
|
|
10
|
-
/**
|
|
11
|
-
* @ignore
|
|
12
|
-
*/
|
|
13
|
-
export declare const PROPERTY_STORE = "tsed:property:store";
|
|
14
|
-
/**
|
|
15
|
-
* @ignore
|
|
16
|
-
*/
|
|
17
|
-
export declare const PARAM_STORE = "tsed:param:store";
|
|
18
|
-
export declare class Store {
|
|
19
|
-
private _entries;
|
|
20
|
-
/**
|
|
21
|
-
* Create or get a Store from args {target + methodName + descriptor}
|
|
22
|
-
* @param args
|
|
23
|
-
* @returns {Store}
|
|
24
|
-
*/
|
|
25
|
-
static from(...args: any[]): Store;
|
|
26
|
-
/**
|
|
27
|
-
* Create store on the method.
|
|
28
|
-
* @param target
|
|
29
|
-
* @param {string} propertyKey
|
|
30
|
-
* @returns {Store}
|
|
31
|
-
*/
|
|
32
|
-
static fromMethod(target: any, propertyKey: string | symbol): Store;
|
|
33
|
-
static mergeStoreFrom(target: Type<any>, source: Type<any>, ...args: any[]): Store;
|
|
34
|
-
static mergeStoreMethodFrom(target: Type<any>, source: Type<any>, propertyKey: string | symbol): Store;
|
|
35
|
-
/**
|
|
36
|
-
* The get() method returns a specified element from a Map object.
|
|
37
|
-
* @param key Required. The key of the element to return from the Map object.
|
|
38
|
-
* @param defaultValue
|
|
39
|
-
* @returns {T} Returns the element associated with the specified key or undefined if the key can't be found in the Map object.
|
|
40
|
-
*/
|
|
41
|
-
get<T = any>(key: any, defaultValue?: any): T;
|
|
42
|
-
/**
|
|
43
|
-
* The has() method returns a boolean indicating whether an element with the specified key exists or not.
|
|
44
|
-
* @param key
|
|
45
|
-
* @returns {boolean}
|
|
46
|
-
*/
|
|
47
|
-
has(key: any): boolean;
|
|
48
|
-
/**
|
|
49
|
-
* The set() method adds or updates an element with a specified key and value to a Map object.
|
|
50
|
-
* @param key Required. The key of the element to add to the Map object.
|
|
51
|
-
* @param metadata Required. The value of the element to add to the Map object.
|
|
52
|
-
*/
|
|
53
|
-
set(key: any, metadata: any): Store;
|
|
54
|
-
/**
|
|
55
|
-
* The delete() method removes the specified element from a Map object.
|
|
56
|
-
* @param key Required. The key of the element to remove from the Map object.
|
|
57
|
-
* @returns {boolean} Returns true if an element in the Map object existed and has been removed, or false if the element does not exist.
|
|
58
|
-
*/
|
|
59
|
-
delete(key: string): boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Merge given value with existing value.
|
|
62
|
-
* @param key
|
|
63
|
-
* @param value
|
|
64
|
-
* @param inverse Change the merge order. Get the existing value and apply over given value
|
|
65
|
-
* @returns {Store}
|
|
66
|
-
*/
|
|
67
|
-
merge(key: any, value: any, inverse?: boolean): Store;
|
|
68
|
-
toJson(): {};
|
|
69
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An example of a `Type` is `MyCustomComponent` filters, which in JavaScript is represented by
|
|
3
|
-
* the `MyCustomComponent` constructor function.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export interface Type<T = any> extends Function {
|
|
9
|
-
new (...args: any[]): T;
|
|
10
|
-
}
|
|
11
|
-
export declare const Type: FunctionConstructor;
|
|
12
|
-
export interface AbstractType<T> extends Function {
|
|
13
|
-
prototype: T;
|
|
14
|
-
}
|