@prostojs/mate 0.3.2 → 0.3.3
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/dist/mate.cjs.prod.js +42 -11
- package/dist/mate.d.ts +5 -4
- package/dist/mate.esm-bundler.js +42 -11
- package/dist/src/mate.d.ts +5 -4
- package/dist/src/mate.d.ts.map +1 -1
- package/dist/src/reflect.d.ts +1 -0
- package/dist/src/reflect.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/mate.cjs.prod.js
CHANGED
|
@@ -11,8 +11,8 @@ function isConstructor(v) {
|
|
|
11
11
|
return typeof v === 'function' && Object.getOwnPropertyNames(v).includes('prototype') && !Object.getOwnPropertyNames(v).includes('caller') && !!v.name;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
let classMetadata = new WeakMap();
|
|
15
|
+
let paramMetadata = new WeakMap();
|
|
16
16
|
const root = typeof global === 'object' ? global : typeof self === 'object' ? self : {};
|
|
17
17
|
function getMetaObject(target, prop) {
|
|
18
18
|
const isParam = typeof prop !== 'undefined';
|
|
@@ -42,6 +42,10 @@ const _reflect = {
|
|
|
42
42
|
Reflect$1.defineMetadata(key, data, target, propKey);
|
|
43
43
|
});
|
|
44
44
|
},
|
|
45
|
+
_cleanup: (() => {
|
|
46
|
+
classMetadata = new WeakMap();
|
|
47
|
+
paramMetadata = new WeakMap();
|
|
48
|
+
}),
|
|
45
49
|
};
|
|
46
50
|
if (!root.Reflect) {
|
|
47
51
|
root.Reflect = _reflect;
|
|
@@ -61,21 +65,32 @@ else {
|
|
|
61
65
|
}
|
|
62
66
|
const Reflect$1 = _reflect;
|
|
63
67
|
|
|
64
|
-
const Reflect = (global === null || global === void 0 ? void 0 : global.Reflect) ||
|
|
68
|
+
const Reflect = ((global === null || global === void 0 ? void 0 : global.Reflect) ||
|
|
69
|
+
(self === null || self === void 0 ? void 0 : self.Reflect) ||
|
|
70
|
+
Reflect$1);
|
|
65
71
|
class Mate {
|
|
66
72
|
constructor(workspace, options = {}) {
|
|
67
73
|
this.workspace = workspace;
|
|
68
74
|
this.options = options;
|
|
69
75
|
this.logger = options.logger || console;
|
|
70
76
|
}
|
|
77
|
+
_cleanup() {
|
|
78
|
+
var _a;
|
|
79
|
+
(_a = Reflect._cleanup) === null || _a === void 0 ? void 0 : _a.call(Reflect);
|
|
80
|
+
}
|
|
71
81
|
set(args, key, value, isArray) {
|
|
72
82
|
var _a;
|
|
73
83
|
let level = 'CLASS';
|
|
74
|
-
const newArgs = args.level === 'CLASS'
|
|
75
|
-
|
|
84
|
+
const newArgs = args.level === 'CLASS'
|
|
85
|
+
? { target: args.target }
|
|
86
|
+
: args.level === 'PROP'
|
|
87
|
+
? { target: args.target, propKey: args.propKey }
|
|
76
88
|
: args;
|
|
77
89
|
let meta = (Reflect.getOwnMetadata(this.workspace, newArgs.target, newArgs.propKey) || {});
|
|
78
|
-
if (newArgs.propKey &&
|
|
90
|
+
if (newArgs.propKey &&
|
|
91
|
+
this.options.readReturnType &&
|
|
92
|
+
!meta.returnType &&
|
|
93
|
+
args.descriptor) {
|
|
79
94
|
meta.returnType = Reflect.getOwnMetadata('design:returntype', newArgs.target, newArgs.propKey);
|
|
80
95
|
}
|
|
81
96
|
if (newArgs.propKey && this.options.readType && !meta.type) {
|
|
@@ -100,7 +115,11 @@ class Mate {
|
|
|
100
115
|
data = data.params[index];
|
|
101
116
|
}
|
|
102
117
|
}
|
|
103
|
-
else if (!index &&
|
|
118
|
+
else if (!index &&
|
|
119
|
+
!args.descriptor &&
|
|
120
|
+
args.propKey &&
|
|
121
|
+
this.options.collectPropKeys &&
|
|
122
|
+
args.level !== 'CLASS') {
|
|
104
123
|
this.set({ ...args, level: 'CLASS' }, (meta) => {
|
|
105
124
|
if (!meta.properties) {
|
|
106
125
|
meta.properties = [args.propKey];
|
|
@@ -111,7 +130,14 @@ class Mate {
|
|
|
111
130
|
return meta;
|
|
112
131
|
});
|
|
113
132
|
}
|
|
114
|
-
level =
|
|
133
|
+
level =
|
|
134
|
+
typeof index === 'number'
|
|
135
|
+
? 'PARAM'
|
|
136
|
+
: newArgs.propKey && newArgs.descriptor
|
|
137
|
+
? 'METHOD'
|
|
138
|
+
: newArgs.propKey
|
|
139
|
+
? 'PROP'
|
|
140
|
+
: 'CLASS';
|
|
115
141
|
if (typeof key !== 'function') {
|
|
116
142
|
if (isArray) {
|
|
117
143
|
const newArray = (data[key] || []);
|
|
@@ -171,8 +197,7 @@ class Mate {
|
|
|
171
197
|
ownParams &&
|
|
172
198
|
(inheritedMeta === null || inheritedMeta === void 0 ? void 0 : inheritedMeta.params)) {
|
|
173
199
|
for (let i = 0; i < ownParams.length; i++) {
|
|
174
|
-
if (typeof (inheritedMeta === null || inheritedMeta === void 0 ? void 0 : inheritedMeta.params[i]) !==
|
|
175
|
-
'undefined') {
|
|
200
|
+
if (typeof (inheritedMeta === null || inheritedMeta === void 0 ? void 0 : inheritedMeta.params[i]) !== 'undefined') {
|
|
176
201
|
const ownParam = ownParams[i];
|
|
177
202
|
if (ownMeta.params &&
|
|
178
203
|
inheritFn &&
|
|
@@ -214,7 +239,13 @@ class Mate {
|
|
|
214
239
|
decorateConditional(ccb) {
|
|
215
240
|
return ((target, propKey, descriptor) => {
|
|
216
241
|
const hasIndex = typeof descriptor === 'number';
|
|
217
|
-
const decoratorLevel = hasIndex
|
|
242
|
+
const decoratorLevel = hasIndex
|
|
243
|
+
? 'PARAM'
|
|
244
|
+
: propKey && descriptor
|
|
245
|
+
? 'METHOD'
|
|
246
|
+
: propKey
|
|
247
|
+
? 'PROP'
|
|
248
|
+
: 'CLASS';
|
|
218
249
|
const d = ccb(decoratorLevel);
|
|
219
250
|
if (d) {
|
|
220
251
|
d(target, propKey, descriptor);
|
package/dist/mate.d.ts
CHANGED
|
@@ -11,17 +11,18 @@ export declare class Mate<TClass extends TObject = TMateClassMeta<TMateParamMeta
|
|
|
11
11
|
protected options: TMateOptions<TClass, TProp>;
|
|
12
12
|
protected logger: TConsoleBase;
|
|
13
13
|
constructor(workspace: string, options?: TMateOptions<TClass, TProp>);
|
|
14
|
-
|
|
14
|
+
_cleanup(): void;
|
|
15
|
+
set<T = TClass & TProp & TCommonMateWithParam<TProp['params'][0]>>(args: TMergedDecoratorArgs, cb: (meta: T, level: TLevels, propKey?: string | symbol, index?: number) => T): void;
|
|
15
16
|
set<T = TClass & TProp & TCommonMateWithParam<TProp['params'][0]>, K extends keyof T = keyof T>(args: TMergedDecoratorArgs, key: keyof T, value: T[K]): void;
|
|
16
17
|
set<T = TClass & TProp & TCommonMateWithParam<TProp['params'][0]>, K extends keyof T = keyof T>(args: TMergedDecoratorArgs, key: keyof T, value: T[K], isArray: boolean | undefined): void;
|
|
17
|
-
read<PK>(target: TFunction | TObject, propKey?: PK): PK extends PropertyKey ? (TClass & TProp & TCommonMate<TProp['params'][0]> | undefined
|
|
18
|
+
read<PK>(target: TFunction | TObject, propKey?: PK): PK extends PropertyKey ? (TClass & TProp & TCommonMate<TProp['params'][0]>) | undefined : TClass | undefined;
|
|
18
19
|
apply(...decorators: (MethodDecorator | ClassDecorator | ParameterDecorator | PropertyDecorator)[]): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
19
|
-
decorate<T = TClass & TProp & TCommonMateWithParam<TProp['params'][0]>>(cb: (
|
|
20
|
+
decorate<T = TClass & TProp & TCommonMateWithParam<TProp['params'][0]>>(cb: (meta: T, level: TLevels, propKey?: string | symbol, index?: number) => T): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
20
21
|
decorate<T = TClass & TProp & TCommonMateWithParam<TProp['params'][0]>, K extends keyof T = keyof T>(key: K, value: T[K]): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
21
22
|
decorate<T = TClass & TProp & TCommonMateWithParam<TProp['params'][0]>, K extends keyof T = keyof T, TIsArray extends boolean = false>(key: K, value: TIsArray extends true ? ArrayElementType<T[K]> : T[K], isArray: TIsArray): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
22
23
|
decorate<T = TClass & TProp & TCommonMateWithParam<TProp['params'][0]>, K extends keyof T = keyof T, TIsArray extends boolean = false>(key: K | ((meta: T, level: TLevels, propKey?: string | symbol, index?: number) => T), value: TIsArray extends true ? ArrayElementType<T[K]> : T[K], isArray: TIsArray, level: TMergedDecoratorArgs['level']): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
23
24
|
decorateConditional(ccb: (level: TLevels) => (MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator) | void | undefined): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
24
|
-
decorateClass<T = TClass>(cb: (
|
|
25
|
+
decorateClass<T = TClass>(cb: (meta: T, level: TLevels, propKey?: string | symbol, index?: number) => T): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
25
26
|
decorateClass<T = TClass, K extends keyof T = keyof T, TIsArray extends boolean = false>(key: K, value: TIsArray extends true ? ArrayElementType<T[K]> : T[K]): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
26
27
|
decorateClass<T = TClass, K extends keyof T = keyof T, TIsArray extends boolean = false>(key: K, value: TIsArray extends true ? ArrayElementType<T[K]> : T[K], isArray: boolean | undefined): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
27
28
|
}
|
package/dist/mate.esm-bundler.js
CHANGED
|
@@ -7,8 +7,8 @@ function isConstructor(v) {
|
|
|
7
7
|
return typeof v === 'function' && Object.getOwnPropertyNames(v).includes('prototype') && !Object.getOwnPropertyNames(v).includes('caller') && !!v.name;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
let classMetadata = new WeakMap();
|
|
11
|
+
let paramMetadata = new WeakMap();
|
|
12
12
|
const root = typeof global === 'object' ? global : typeof self === 'object' ? self : {};
|
|
13
13
|
function getMetaObject(target, prop) {
|
|
14
14
|
const isParam = typeof prop !== 'undefined';
|
|
@@ -38,6 +38,10 @@ const _reflect = {
|
|
|
38
38
|
Reflect$1.defineMetadata(key, data, target, propKey);
|
|
39
39
|
});
|
|
40
40
|
},
|
|
41
|
+
_cleanup: (() => {
|
|
42
|
+
classMetadata = new WeakMap();
|
|
43
|
+
paramMetadata = new WeakMap();
|
|
44
|
+
}),
|
|
41
45
|
};
|
|
42
46
|
if (!root.Reflect) {
|
|
43
47
|
root.Reflect = _reflect;
|
|
@@ -57,21 +61,32 @@ else {
|
|
|
57
61
|
}
|
|
58
62
|
const Reflect$1 = _reflect;
|
|
59
63
|
|
|
60
|
-
const Reflect = (global === null || global === void 0 ? void 0 : global.Reflect) ||
|
|
64
|
+
const Reflect = ((global === null || global === void 0 ? void 0 : global.Reflect) ||
|
|
65
|
+
(self === null || self === void 0 ? void 0 : self.Reflect) ||
|
|
66
|
+
Reflect$1);
|
|
61
67
|
class Mate {
|
|
62
68
|
constructor(workspace, options = {}) {
|
|
63
69
|
this.workspace = workspace;
|
|
64
70
|
this.options = options;
|
|
65
71
|
this.logger = options.logger || console;
|
|
66
72
|
}
|
|
73
|
+
_cleanup() {
|
|
74
|
+
var _a;
|
|
75
|
+
(_a = Reflect._cleanup) === null || _a === void 0 ? void 0 : _a.call(Reflect);
|
|
76
|
+
}
|
|
67
77
|
set(args, key, value, isArray) {
|
|
68
78
|
var _a;
|
|
69
79
|
let level = 'CLASS';
|
|
70
|
-
const newArgs = args.level === 'CLASS'
|
|
71
|
-
|
|
80
|
+
const newArgs = args.level === 'CLASS'
|
|
81
|
+
? { target: args.target }
|
|
82
|
+
: args.level === 'PROP'
|
|
83
|
+
? { target: args.target, propKey: args.propKey }
|
|
72
84
|
: args;
|
|
73
85
|
let meta = (Reflect.getOwnMetadata(this.workspace, newArgs.target, newArgs.propKey) || {});
|
|
74
|
-
if (newArgs.propKey &&
|
|
86
|
+
if (newArgs.propKey &&
|
|
87
|
+
this.options.readReturnType &&
|
|
88
|
+
!meta.returnType &&
|
|
89
|
+
args.descriptor) {
|
|
75
90
|
meta.returnType = Reflect.getOwnMetadata('design:returntype', newArgs.target, newArgs.propKey);
|
|
76
91
|
}
|
|
77
92
|
if (newArgs.propKey && this.options.readType && !meta.type) {
|
|
@@ -96,7 +111,11 @@ class Mate {
|
|
|
96
111
|
data = data.params[index];
|
|
97
112
|
}
|
|
98
113
|
}
|
|
99
|
-
else if (!index &&
|
|
114
|
+
else if (!index &&
|
|
115
|
+
!args.descriptor &&
|
|
116
|
+
args.propKey &&
|
|
117
|
+
this.options.collectPropKeys &&
|
|
118
|
+
args.level !== 'CLASS') {
|
|
100
119
|
this.set({ ...args, level: 'CLASS' }, (meta) => {
|
|
101
120
|
if (!meta.properties) {
|
|
102
121
|
meta.properties = [args.propKey];
|
|
@@ -107,7 +126,14 @@ class Mate {
|
|
|
107
126
|
return meta;
|
|
108
127
|
});
|
|
109
128
|
}
|
|
110
|
-
level =
|
|
129
|
+
level =
|
|
130
|
+
typeof index === 'number'
|
|
131
|
+
? 'PARAM'
|
|
132
|
+
: newArgs.propKey && newArgs.descriptor
|
|
133
|
+
? 'METHOD'
|
|
134
|
+
: newArgs.propKey
|
|
135
|
+
? 'PROP'
|
|
136
|
+
: 'CLASS';
|
|
111
137
|
if (typeof key !== 'function') {
|
|
112
138
|
if (isArray) {
|
|
113
139
|
const newArray = (data[key] || []);
|
|
@@ -167,8 +193,7 @@ class Mate {
|
|
|
167
193
|
ownParams &&
|
|
168
194
|
(inheritedMeta === null || inheritedMeta === void 0 ? void 0 : inheritedMeta.params)) {
|
|
169
195
|
for (let i = 0; i < ownParams.length; i++) {
|
|
170
|
-
if (typeof (inheritedMeta === null || inheritedMeta === void 0 ? void 0 : inheritedMeta.params[i]) !==
|
|
171
|
-
'undefined') {
|
|
196
|
+
if (typeof (inheritedMeta === null || inheritedMeta === void 0 ? void 0 : inheritedMeta.params[i]) !== 'undefined') {
|
|
172
197
|
const ownParam = ownParams[i];
|
|
173
198
|
if (ownMeta.params &&
|
|
174
199
|
inheritFn &&
|
|
@@ -210,7 +235,13 @@ class Mate {
|
|
|
210
235
|
decorateConditional(ccb) {
|
|
211
236
|
return ((target, propKey, descriptor) => {
|
|
212
237
|
const hasIndex = typeof descriptor === 'number';
|
|
213
|
-
const decoratorLevel = hasIndex
|
|
238
|
+
const decoratorLevel = hasIndex
|
|
239
|
+
? 'PARAM'
|
|
240
|
+
: propKey && descriptor
|
|
241
|
+
? 'METHOD'
|
|
242
|
+
: propKey
|
|
243
|
+
? 'PROP'
|
|
244
|
+
: 'CLASS';
|
|
214
245
|
const d = ccb(decoratorLevel);
|
|
215
246
|
if (d) {
|
|
216
247
|
d(target, propKey, descriptor);
|
package/dist/src/mate.d.ts
CHANGED
|
@@ -42,17 +42,18 @@ export declare class Mate<TClass extends TObject = TMateClassMeta<TMateParamMeta
|
|
|
42
42
|
protected options: TMateOptions<TClass, TProp>;
|
|
43
43
|
protected logger: TConsoleBase;
|
|
44
44
|
constructor(workspace: string, options?: TMateOptions<TClass, TProp>);
|
|
45
|
-
|
|
45
|
+
_cleanup(): void;
|
|
46
|
+
set<T = TClass & TProp & TCommonMateWithParam<TProp['params'][0]>>(args: TMergedDecoratorArgs, cb: (meta: T, level: TLevels, propKey?: string | symbol, index?: number) => T): void;
|
|
46
47
|
set<T = TClass & TProp & TCommonMateWithParam<TProp['params'][0]>, K extends keyof T = keyof T>(args: TMergedDecoratorArgs, key: keyof T, value: T[K]): void;
|
|
47
48
|
set<T = TClass & TProp & TCommonMateWithParam<TProp['params'][0]>, K extends keyof T = keyof T>(args: TMergedDecoratorArgs, key: keyof T, value: T[K], isArray: boolean | undefined): void;
|
|
48
|
-
read<PK>(target: TFunction | TObject, propKey?: PK): PK extends PropertyKey ? (TClass & TProp & TCommonMate<TProp['params'][0]> | undefined
|
|
49
|
+
read<PK>(target: TFunction | TObject, propKey?: PK): PK extends PropertyKey ? (TClass & TProp & TCommonMate<TProp['params'][0]>) | undefined : TClass | undefined;
|
|
49
50
|
apply(...decorators: (MethodDecorator | ClassDecorator | ParameterDecorator | PropertyDecorator)[]): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
50
|
-
decorate<T = TClass & TProp & TCommonMateWithParam<TProp['params'][0]>>(cb: (
|
|
51
|
+
decorate<T = TClass & TProp & TCommonMateWithParam<TProp['params'][0]>>(cb: (meta: T, level: TLevels, propKey?: string | symbol, index?: number) => T): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
51
52
|
decorate<T = TClass & TProp & TCommonMateWithParam<TProp['params'][0]>, K extends keyof T = keyof T>(key: K, value: T[K]): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
52
53
|
decorate<T = TClass & TProp & TCommonMateWithParam<TProp['params'][0]>, K extends keyof T = keyof T, TIsArray extends boolean = false>(key: K, value: TIsArray extends true ? ArrayElementType<T[K]> : T[K], isArray: TIsArray): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
53
54
|
decorate<T = TClass & TProp & TCommonMateWithParam<TProp['params'][0]>, K extends keyof T = keyof T, TIsArray extends boolean = false>(key: K | ((meta: T, level: TLevels, propKey?: string | symbol, index?: number) => T), value: TIsArray extends true ? ArrayElementType<T[K]> : T[K], isArray: TIsArray, level: TMergedDecoratorArgs['level']): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
54
55
|
decorateConditional(ccb: (level: TLevels) => (MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator) | void | undefined): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
55
|
-
decorateClass<T = TClass>(cb: (
|
|
56
|
+
decorateClass<T = TClass>(cb: (meta: T, level: TLevels, propKey?: string | symbol, index?: number) => T): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
56
57
|
decorateClass<T = TClass, K extends keyof T = keyof T, TIsArray extends boolean = false>(key: K, value: TIsArray extends true ? ArrayElementType<T[K]> : T[K]): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
57
58
|
decorateClass<T = TClass, K extends keyof T = keyof T, TIsArray extends boolean = false>(key: K, value: TIsArray extends true ? ArrayElementType<T[K]> : T[K], isArray: boolean | undefined): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
|
|
58
59
|
}
|
package/dist/src/mate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mate.d.ts","sourceRoot":"","sources":["../../src/mate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAK,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"mate.d.ts","sourceRoot":"","sources":["../../src/mate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAK,SAAS,CAAA;AAQjD,aAAK,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;AAEpD,MAAM,WAAW,oBAAoB;IACjC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAA;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,uBAAuB,CAAC,IAAI,CAAC,CAAA;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,cAAc;IAC3B,IAAI,CAAC,EAAE,SAAS,CAAA;CACnB;AAED,MAAM,WAAW,aAAa,CAAC,MAAM,SAAS,OAAO,GAAG,MAAM;IAC1D,MAAM,CAAC,EAAE,CAAC,MAAM,GAAG,cAAc,CAAC,EAAE,CAAA;CACvC;AAED,MAAM,WAAW,cAAc,CAAC,MAAM;IAClC,UAAU,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;IAChC,IAAI,CAAC,EAAE,SAAS,CAAA;I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ErB,aAAa,CACT,CAAC,GAAG,MAAM,EACV,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,CAAC,EAC3B,QAAQ,SAAS,OAAO,GAAG,KAAK,EAEhC,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,QAAQ,SAAS,IAAI,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAC7D,eAAe,GACd,cAAc,GACd,kBAAkB,GAClB,iBAAiB;IAErB,aAAa,CACT,CAAC,GAAG,MAAM,EACV,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,CAAC,EAC3B,QAAQ,SAAS,OAAO,GAAG,KAAK,EAEhC,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,QAAQ,SAAS,IAAI,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAC5D,OAAO,EAAE,OAAO,GAAG,SAAS,GAC7B,eAAe,GACd,cAAc,GACd,kBAAkB,GAClB,iBAAiB;CA4BxB;AAID,aAAK,gBAAgB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC"}
|
package/dist/src/reflect.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ export declare const Reflect: {
|
|
|
3
3
|
getOwnMetadata(key: string | symbol, target: TObject | TFunction, prop?: string | symbol): unknown;
|
|
4
4
|
defineMetadata(key: string | symbol, data: unknown, target: TObject | TFunction, prop?: string | symbol): void;
|
|
5
5
|
metadata(key: string | symbol, data: unknown): ClassDecorator & MethodDecorator & ParameterDecorator;
|
|
6
|
+
_cleanup: (() => void) | undefined;
|
|
6
7
|
};
|
|
7
8
|
//# sourceMappingURL=reflect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reflect.d.ts","sourceRoot":"","sources":["../../src/reflect.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"reflect.d.ts","sourceRoot":"","sources":["../../src/reflect.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AA6E5C,eAAO,MAAM,OAAO;wBA9CI,MAAM,GAAG,MAAM,UAAU,OAAO,GAAG,SAAS,SAAS,MAAM,GAAG,MAAM,GAAG,OAAO;wBAG9E,MAAM,GAAG,MAAM,QAAQ,OAAO,UAAU,OAAO,GAAG,SAAS,SAAS,MAAM,GAAG,MAAM,GAAG,IAAI;kBAIhG,MAAM,GAAG,MAAM,QAAQ,OAAO,GAAG,cAAc,GAAG,eAAe,GAAG,kBAAkB;qBAevF,IAAI;CAwBU,CAAA"}
|