lakutata 2.0.1 → 2.0.2
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/com/database.d.ts +4 -4
- package/com/docker.d.ts +5 -4
- package/com/entrypoint.cjs +13 -11
- package/com/entrypoint.d.ts +13 -8
- package/com/entrypoint.mjs +2 -2
- package/com/logger.d.ts +3 -3
- package/decorator/asst.d.ts +2 -2
- package/decorator/ctrl.d.ts +5 -5
- package/decorator/di.d.ts +5 -5
- package/decorator/dto.d.ts +5 -5
- package/decorator/orm.d.ts +3 -3
- package/helper.d.ts +2 -2
- package/lakutata.cjs +16 -18
- package/lakutata.d.ts +12 -16
- package/lakutata.mjs +2 -2
- package/orm.d.ts +4 -4
- package/orm.mjs +30 -30
- package/package.json +1 -1
- package/src/components/entrypoint/Entrypoint.cjs +1 -1
- package/src/components/entrypoint/Entrypoint.mjs +1 -1
- package/src/components/entrypoint/exceptions/ControllerActionNotFoundException.cjs +34 -0
- package/src/components/entrypoint/exceptions/ControllerActionNotFoundException.mjs +28 -0
- package/src/decorators/orm/Column.cjs +14 -14
- package/src/decorators/orm/Column.mjs +2 -2
- package/src/decorators/orm/PrimaryColumn.cjs +1 -1
- package/src/decorators/orm/PrimaryColumn.mjs +2 -2
- package/src/lib/core/Application.cjs +1 -1
- package/src/lib/core/Application.mjs +1 -1
- package/vendor/Package.14.cjs +20 -18
- package/vendor/Package.14.mjs +17 -19
- package/vendor/TypeDef.1.d.ts +274 -489
- package/vendor/TypeDef.10.d.ts +5 -6
- package/vendor/TypeDef.11.d.ts +4 -104
- package/vendor/TypeDef.12.d.ts +96 -60
- package/vendor/TypeDef.13.d.ts +71 -0
- package/vendor/TypeDef.2.d.ts +489 -948
- package/vendor/TypeDef.3.d.ts +662 -18813
- package/vendor/TypeDef.4.d.ts +18176 -3169
- package/vendor/TypeDef.5.d.ts +4093 -12
- package/vendor/TypeDef.6.d.ts +11 -2
- package/vendor/TypeDef.7.d.ts +20 -2
- package/vendor/TypeDef.8.d.ts +2 -5
- package/vendor/TypeDef.9.d.ts +2 -294
- package/src/exceptions/ControllerActionNotFoundException.cjs +0 -34
- package/src/exceptions/ControllerActionNotFoundException.mjs +0 -28
package/vendor/TypeDef.1.d.ts
CHANGED
|
@@ -1,490 +1,275 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
***************************************************************************** */
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
declare global {
|
|
19
|
-
namespace Reflect {
|
|
20
|
-
/**
|
|
21
|
-
* Applies a set of decorators to a target object.
|
|
22
|
-
* @param decorators An array of decorators.
|
|
23
|
-
* @param target The target object.
|
|
24
|
-
* @returns The result of applying the provided decorators.
|
|
25
|
-
* @remarks Decorators are applied in reverse order of their positions in the array.
|
|
26
|
-
* @example
|
|
27
|
-
*
|
|
28
|
-
* class Example { }
|
|
29
|
-
*
|
|
30
|
-
* // constructor
|
|
31
|
-
* Example = Reflect.decorate(decoratorsArray, Example);
|
|
32
|
-
*
|
|
33
|
-
*/
|
|
34
|
-
function decorate(decorators: ClassDecorator[], target: Function): Function;
|
|
35
|
-
/**
|
|
36
|
-
* Applies a set of decorators to a property of a target object.
|
|
37
|
-
* @param decorators An array of decorators.
|
|
38
|
-
* @param target The target object.
|
|
39
|
-
* @param propertyKey The property key to decorate.
|
|
40
|
-
* @param attributes A property descriptor.
|
|
41
|
-
* @remarks Decorators are applied in reverse order.
|
|
42
|
-
* @example
|
|
43
|
-
*
|
|
44
|
-
* class Example {
|
|
45
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
46
|
-
* // static staticProperty;
|
|
47
|
-
* // property;
|
|
48
|
-
*
|
|
49
|
-
* static staticMethod() { }
|
|
50
|
-
* method() { }
|
|
51
|
-
* }
|
|
52
|
-
*
|
|
53
|
-
* // property (on constructor)
|
|
54
|
-
* Reflect.decorate(decoratorsArray, Example, "staticProperty");
|
|
55
|
-
*
|
|
56
|
-
* // property (on prototype)
|
|
57
|
-
* Reflect.decorate(decoratorsArray, Example.prototype, "property");
|
|
58
|
-
*
|
|
59
|
-
* // method (on constructor)
|
|
60
|
-
* Object.defineProperty(Example, "staticMethod",
|
|
61
|
-
* Reflect.decorate(decoratorsArray, Example, "staticMethod",
|
|
62
|
-
* Object.getOwnPropertyDescriptor(Example, "staticMethod")));
|
|
63
|
-
*
|
|
64
|
-
* // method (on prototype)
|
|
65
|
-
* Object.defineProperty(Example.prototype, "method",
|
|
66
|
-
* Reflect.decorate(decoratorsArray, Example.prototype, "method",
|
|
67
|
-
* Object.getOwnPropertyDescriptor(Example.prototype, "method")));
|
|
68
|
-
*
|
|
69
|
-
*/
|
|
70
|
-
function decorate(decorators: (PropertyDecorator | MethodDecorator)[], target: Object, propertyKey: string | symbol, attributes?: PropertyDescriptor): PropertyDescriptor;
|
|
71
|
-
/**
|
|
72
|
-
* A default metadata decorator factory that can be used on a class, class member, or parameter.
|
|
73
|
-
* @param metadataKey The key for the metadata entry.
|
|
74
|
-
* @param metadataValue The value for the metadata entry.
|
|
75
|
-
* @returns A decorator function.
|
|
76
|
-
* @remarks
|
|
77
|
-
* If `metadataKey` is already defined for the target and target key, the
|
|
78
|
-
* metadataValue for that key will be overwritten.
|
|
79
|
-
* @example
|
|
80
|
-
*
|
|
81
|
-
* // constructor
|
|
82
|
-
* @Reflect.metadata(key, value)
|
|
83
|
-
* class Example {
|
|
84
|
-
* }
|
|
85
|
-
*
|
|
86
|
-
* // property (on constructor, TypeScript only)
|
|
87
|
-
* class Example {
|
|
88
|
-
* @Reflect.metadata(key, value)
|
|
89
|
-
* static staticProperty;
|
|
90
|
-
* }
|
|
91
|
-
*
|
|
92
|
-
* // property (on prototype, TypeScript only)
|
|
93
|
-
* class Example {
|
|
94
|
-
* @Reflect.metadata(key, value)
|
|
95
|
-
* property;
|
|
96
|
-
* }
|
|
97
|
-
*
|
|
98
|
-
* // method (on constructor)
|
|
99
|
-
* class Example {
|
|
100
|
-
* @Reflect.metadata(key, value)
|
|
101
|
-
* static staticMethod() { }
|
|
102
|
-
* }
|
|
103
|
-
*
|
|
104
|
-
* // method (on prototype)
|
|
105
|
-
* class Example {
|
|
106
|
-
* @Reflect.metadata(key, value)
|
|
107
|
-
* method() { }
|
|
108
|
-
* }
|
|
109
|
-
*
|
|
110
|
-
*/
|
|
111
|
-
function metadata(metadataKey: any, metadataValue: any): {
|
|
112
|
-
(target: Function): void;
|
|
113
|
-
(target: Object, propertyKey: string | symbol): void;
|
|
114
|
-
};
|
|
115
|
-
/**
|
|
116
|
-
* Define a unique metadata entry on the target.
|
|
117
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
118
|
-
* @param metadataValue A value that contains attached metadata.
|
|
119
|
-
* @param target The target object on which to define metadata.
|
|
120
|
-
* @example
|
|
121
|
-
*
|
|
122
|
-
* class Example {
|
|
123
|
-
* }
|
|
124
|
-
*
|
|
125
|
-
* // constructor
|
|
126
|
-
* Reflect.defineMetadata("custom:annotation", options, Example);
|
|
127
|
-
*
|
|
128
|
-
* // decorator factory as metadata-producing annotation.
|
|
129
|
-
* function MyAnnotation(options): ClassDecorator {
|
|
130
|
-
* return target => Reflect.defineMetadata("custom:annotation", options, target);
|
|
131
|
-
* }
|
|
132
|
-
*
|
|
133
|
-
*/
|
|
134
|
-
function defineMetadata(metadataKey: any, metadataValue: any, target: Object): void;
|
|
135
|
-
/**
|
|
136
|
-
* Define a unique metadata entry on the target.
|
|
137
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
138
|
-
* @param metadataValue A value that contains attached metadata.
|
|
139
|
-
* @param target The target object on which to define metadata.
|
|
140
|
-
* @param propertyKey The property key for the target.
|
|
141
|
-
* @example
|
|
142
|
-
*
|
|
143
|
-
* class Example {
|
|
144
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
145
|
-
* // static staticProperty;
|
|
146
|
-
* // property;
|
|
147
|
-
*
|
|
148
|
-
* static staticMethod(p) { }
|
|
149
|
-
* method(p) { }
|
|
150
|
-
* }
|
|
151
|
-
*
|
|
152
|
-
* // property (on constructor)
|
|
153
|
-
* Reflect.defineMetadata("custom:annotation", Number, Example, "staticProperty");
|
|
154
|
-
*
|
|
155
|
-
* // property (on prototype)
|
|
156
|
-
* Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "property");
|
|
157
|
-
*
|
|
158
|
-
* // method (on constructor)
|
|
159
|
-
* Reflect.defineMetadata("custom:annotation", Number, Example, "staticMethod");
|
|
160
|
-
*
|
|
161
|
-
* // method (on prototype)
|
|
162
|
-
* Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "method");
|
|
163
|
-
*
|
|
164
|
-
* // decorator factory as metadata-producing annotation.
|
|
165
|
-
* function MyAnnotation(options): PropertyDecorator {
|
|
166
|
-
* return (target, key) => Reflect.defineMetadata("custom:annotation", options, target, key);
|
|
167
|
-
* }
|
|
168
|
-
*
|
|
169
|
-
*/
|
|
170
|
-
function defineMetadata(metadataKey: any, metadataValue: any, target: Object, propertyKey: string | symbol): void;
|
|
171
|
-
/**
|
|
172
|
-
* Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
|
|
173
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
174
|
-
* @param target The target object on which the metadata is defined.
|
|
175
|
-
* @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
|
|
176
|
-
* @example
|
|
177
|
-
*
|
|
178
|
-
* class Example {
|
|
179
|
-
* }
|
|
180
|
-
*
|
|
181
|
-
* // constructor
|
|
182
|
-
* result = Reflect.hasMetadata("custom:annotation", Example);
|
|
183
|
-
*
|
|
184
|
-
*/
|
|
185
|
-
function hasMetadata(metadataKey: any, target: Object): boolean;
|
|
186
|
-
/**
|
|
187
|
-
* Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
|
|
188
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
189
|
-
* @param target The target object on which the metadata is defined.
|
|
190
|
-
* @param propertyKey The property key for the target.
|
|
191
|
-
* @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
|
|
192
|
-
* @example
|
|
193
|
-
*
|
|
194
|
-
* class Example {
|
|
195
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
196
|
-
* // static staticProperty;
|
|
197
|
-
* // property;
|
|
198
|
-
*
|
|
199
|
-
* static staticMethod(p) { }
|
|
200
|
-
* method(p) { }
|
|
201
|
-
* }
|
|
202
|
-
*
|
|
203
|
-
* // property (on constructor)
|
|
204
|
-
* result = Reflect.hasMetadata("custom:annotation", Example, "staticProperty");
|
|
205
|
-
*
|
|
206
|
-
* // property (on prototype)
|
|
207
|
-
* result = Reflect.hasMetadata("custom:annotation", Example.prototype, "property");
|
|
208
|
-
*
|
|
209
|
-
* // method (on constructor)
|
|
210
|
-
* result = Reflect.hasMetadata("custom:annotation", Example, "staticMethod");
|
|
211
|
-
*
|
|
212
|
-
* // method (on prototype)
|
|
213
|
-
* result = Reflect.hasMetadata("custom:annotation", Example.prototype, "method");
|
|
214
|
-
*
|
|
215
|
-
*/
|
|
216
|
-
function hasMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
|
|
217
|
-
/**
|
|
218
|
-
* Gets a value indicating whether the target object has the provided metadata key defined.
|
|
219
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
220
|
-
* @param target The target object on which the metadata is defined.
|
|
221
|
-
* @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
|
|
222
|
-
* @example
|
|
223
|
-
*
|
|
224
|
-
* class Example {
|
|
225
|
-
* }
|
|
226
|
-
*
|
|
227
|
-
* // constructor
|
|
228
|
-
* result = Reflect.hasOwnMetadata("custom:annotation", Example);
|
|
229
|
-
*
|
|
230
|
-
*/
|
|
231
|
-
function hasOwnMetadata(metadataKey: any, target: Object): boolean;
|
|
232
|
-
/**
|
|
233
|
-
* Gets a value indicating whether the target object has the provided metadata key defined.
|
|
234
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
235
|
-
* @param target The target object on which the metadata is defined.
|
|
236
|
-
* @param propertyKey The property key for the target.
|
|
237
|
-
* @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
|
|
238
|
-
* @example
|
|
239
|
-
*
|
|
240
|
-
* class Example {
|
|
241
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
242
|
-
* // static staticProperty;
|
|
243
|
-
* // property;
|
|
244
|
-
*
|
|
245
|
-
* static staticMethod(p) { }
|
|
246
|
-
* method(p) { }
|
|
247
|
-
* }
|
|
248
|
-
*
|
|
249
|
-
* // property (on constructor)
|
|
250
|
-
* result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticProperty");
|
|
251
|
-
*
|
|
252
|
-
* // property (on prototype)
|
|
253
|
-
* result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "property");
|
|
254
|
-
*
|
|
255
|
-
* // method (on constructor)
|
|
256
|
-
* result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticMethod");
|
|
257
|
-
*
|
|
258
|
-
* // method (on prototype)
|
|
259
|
-
* result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "method");
|
|
260
|
-
*
|
|
261
|
-
*/
|
|
262
|
-
function hasOwnMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
|
|
263
|
-
/**
|
|
264
|
-
* Gets the metadata value for the provided metadata key on the target object or its prototype chain.
|
|
265
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
266
|
-
* @param target The target object on which the metadata is defined.
|
|
267
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
268
|
-
* @example
|
|
269
|
-
*
|
|
270
|
-
* class Example {
|
|
271
|
-
* }
|
|
272
|
-
*
|
|
273
|
-
* // constructor
|
|
274
|
-
* result = Reflect.getMetadata("custom:annotation", Example);
|
|
275
|
-
*
|
|
276
|
-
*/
|
|
277
|
-
function getMetadata(metadataKey: any, target: Object): any;
|
|
278
|
-
/**
|
|
279
|
-
* Gets the metadata value for the provided metadata key on the target object or its prototype chain.
|
|
280
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
281
|
-
* @param target The target object on which the metadata is defined.
|
|
282
|
-
* @param propertyKey The property key for the target.
|
|
283
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
284
|
-
* @example
|
|
285
|
-
*
|
|
286
|
-
* class Example {
|
|
287
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
288
|
-
* // static staticProperty;
|
|
289
|
-
* // property;
|
|
290
|
-
*
|
|
291
|
-
* static staticMethod(p) { }
|
|
292
|
-
* method(p) { }
|
|
293
|
-
* }
|
|
294
|
-
*
|
|
295
|
-
* // property (on constructor)
|
|
296
|
-
* result = Reflect.getMetadata("custom:annotation", Example, "staticProperty");
|
|
297
|
-
*
|
|
298
|
-
* // property (on prototype)
|
|
299
|
-
* result = Reflect.getMetadata("custom:annotation", Example.prototype, "property");
|
|
300
|
-
*
|
|
301
|
-
* // method (on constructor)
|
|
302
|
-
* result = Reflect.getMetadata("custom:annotation", Example, "staticMethod");
|
|
303
|
-
*
|
|
304
|
-
* // method (on prototype)
|
|
305
|
-
* result = Reflect.getMetadata("custom:annotation", Example.prototype, "method");
|
|
306
|
-
*
|
|
307
|
-
*/
|
|
308
|
-
function getMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): any;
|
|
309
|
-
/**
|
|
310
|
-
* Gets the metadata value for the provided metadata key on the target object.
|
|
311
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
312
|
-
* @param target The target object on which the metadata is defined.
|
|
313
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
314
|
-
* @example
|
|
315
|
-
*
|
|
316
|
-
* class Example {
|
|
317
|
-
* }
|
|
318
|
-
*
|
|
319
|
-
* // constructor
|
|
320
|
-
* result = Reflect.getOwnMetadata("custom:annotation", Example);
|
|
321
|
-
*
|
|
322
|
-
*/
|
|
323
|
-
function getOwnMetadata(metadataKey: any, target: Object): any;
|
|
324
|
-
/**
|
|
325
|
-
* Gets the metadata value for the provided metadata key on the target object.
|
|
326
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
327
|
-
* @param target The target object on which the metadata is defined.
|
|
328
|
-
* @param propertyKey The property key for the target.
|
|
329
|
-
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
|
|
330
|
-
* @example
|
|
331
|
-
*
|
|
332
|
-
* class Example {
|
|
333
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
334
|
-
* // static staticProperty;
|
|
335
|
-
* // property;
|
|
336
|
-
*
|
|
337
|
-
* static staticMethod(p) { }
|
|
338
|
-
* method(p) { }
|
|
339
|
-
* }
|
|
340
|
-
*
|
|
341
|
-
* // property (on constructor)
|
|
342
|
-
* result = Reflect.getOwnMetadata("custom:annotation", Example, "staticProperty");
|
|
343
|
-
*
|
|
344
|
-
* // property (on prototype)
|
|
345
|
-
* result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "property");
|
|
346
|
-
*
|
|
347
|
-
* // method (on constructor)
|
|
348
|
-
* result = Reflect.getOwnMetadata("custom:annotation", Example, "staticMethod");
|
|
349
|
-
*
|
|
350
|
-
* // method (on prototype)
|
|
351
|
-
* result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "method");
|
|
352
|
-
*
|
|
353
|
-
*/
|
|
354
|
-
function getOwnMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): any;
|
|
355
|
-
/**
|
|
356
|
-
* Gets the metadata keys defined on the target object or its prototype chain.
|
|
357
|
-
* @param target The target object on which the metadata is defined.
|
|
358
|
-
* @returns An array of unique metadata keys.
|
|
359
|
-
* @example
|
|
360
|
-
*
|
|
361
|
-
* class Example {
|
|
362
|
-
* }
|
|
363
|
-
*
|
|
364
|
-
* // constructor
|
|
365
|
-
* result = Reflect.getMetadataKeys(Example);
|
|
366
|
-
*
|
|
367
|
-
*/
|
|
368
|
-
function getMetadataKeys(target: Object): any[];
|
|
369
|
-
/**
|
|
370
|
-
* Gets the metadata keys defined on the target object or its prototype chain.
|
|
371
|
-
* @param target The target object on which the metadata is defined.
|
|
372
|
-
* @param propertyKey The property key for the target.
|
|
373
|
-
* @returns An array of unique metadata keys.
|
|
374
|
-
* @example
|
|
375
|
-
*
|
|
376
|
-
* class Example {
|
|
377
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
378
|
-
* // static staticProperty;
|
|
379
|
-
* // property;
|
|
380
|
-
*
|
|
381
|
-
* static staticMethod(p) { }
|
|
382
|
-
* method(p) { }
|
|
383
|
-
* }
|
|
384
|
-
*
|
|
385
|
-
* // property (on constructor)
|
|
386
|
-
* result = Reflect.getMetadataKeys(Example, "staticProperty");
|
|
387
|
-
*
|
|
388
|
-
* // property (on prototype)
|
|
389
|
-
* result = Reflect.getMetadataKeys(Example.prototype, "property");
|
|
390
|
-
*
|
|
391
|
-
* // method (on constructor)
|
|
392
|
-
* result = Reflect.getMetadataKeys(Example, "staticMethod");
|
|
393
|
-
*
|
|
394
|
-
* // method (on prototype)
|
|
395
|
-
* result = Reflect.getMetadataKeys(Example.prototype, "method");
|
|
396
|
-
*
|
|
397
|
-
*/
|
|
398
|
-
function getMetadataKeys(target: Object, propertyKey: string | symbol): any[];
|
|
399
|
-
/**
|
|
400
|
-
* Gets the unique metadata keys defined on the target object.
|
|
401
|
-
* @param target The target object on which the metadata is defined.
|
|
402
|
-
* @returns An array of unique metadata keys.
|
|
403
|
-
* @example
|
|
404
|
-
*
|
|
405
|
-
* class Example {
|
|
406
|
-
* }
|
|
407
|
-
*
|
|
408
|
-
* // constructor
|
|
409
|
-
* result = Reflect.getOwnMetadataKeys(Example);
|
|
410
|
-
*
|
|
411
|
-
*/
|
|
412
|
-
function getOwnMetadataKeys(target: Object): any[];
|
|
413
|
-
/**
|
|
414
|
-
* Gets the unique metadata keys defined on the target object.
|
|
415
|
-
* @param target The target object on which the metadata is defined.
|
|
416
|
-
* @param propertyKey The property key for the target.
|
|
417
|
-
* @returns An array of unique metadata keys.
|
|
418
|
-
* @example
|
|
419
|
-
*
|
|
420
|
-
* class Example {
|
|
421
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
422
|
-
* // static staticProperty;
|
|
423
|
-
* // property;
|
|
424
|
-
*
|
|
425
|
-
* static staticMethod(p) { }
|
|
426
|
-
* method(p) { }
|
|
427
|
-
* }
|
|
428
|
-
*
|
|
429
|
-
* // property (on constructor)
|
|
430
|
-
* result = Reflect.getOwnMetadataKeys(Example, "staticProperty");
|
|
431
|
-
*
|
|
432
|
-
* // property (on prototype)
|
|
433
|
-
* result = Reflect.getOwnMetadataKeys(Example.prototype, "property");
|
|
434
|
-
*
|
|
435
|
-
* // method (on constructor)
|
|
436
|
-
* result = Reflect.getOwnMetadataKeys(Example, "staticMethod");
|
|
437
|
-
*
|
|
438
|
-
* // method (on prototype)
|
|
439
|
-
* result = Reflect.getOwnMetadataKeys(Example.prototype, "method");
|
|
440
|
-
*
|
|
441
|
-
*/
|
|
442
|
-
function getOwnMetadataKeys(target: Object, propertyKey: string | symbol): any[];
|
|
443
|
-
/**
|
|
444
|
-
* Deletes the metadata entry from the target object with the provided key.
|
|
445
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
446
|
-
* @param target The target object on which the metadata is defined.
|
|
447
|
-
* @returns `true` if the metadata entry was found and deleted; otherwise, false.
|
|
448
|
-
* @example
|
|
449
|
-
*
|
|
450
|
-
* class Example {
|
|
451
|
-
* }
|
|
452
|
-
*
|
|
453
|
-
* // constructor
|
|
454
|
-
* result = Reflect.deleteMetadata("custom:annotation", Example);
|
|
455
|
-
*
|
|
456
|
-
*/
|
|
457
|
-
function deleteMetadata(metadataKey: any, target: Object): boolean;
|
|
458
|
-
/**
|
|
459
|
-
* Deletes the metadata entry from the target object with the provided key.
|
|
460
|
-
* @param metadataKey A key used to store and retrieve metadata.
|
|
461
|
-
* @param target The target object on which the metadata is defined.
|
|
462
|
-
* @param propertyKey The property key for the target.
|
|
463
|
-
* @returns `true` if the metadata entry was found and deleted; otherwise, false.
|
|
464
|
-
* @example
|
|
465
|
-
*
|
|
466
|
-
* class Example {
|
|
467
|
-
* // property declarations are not part of ES6, though they are valid in TypeScript:
|
|
468
|
-
* // static staticProperty;
|
|
469
|
-
* // property;
|
|
470
|
-
*
|
|
471
|
-
* static staticMethod(p) { }
|
|
472
|
-
* method(p) { }
|
|
473
|
-
* }
|
|
474
|
-
*
|
|
475
|
-
* // property (on constructor)
|
|
476
|
-
* result = Reflect.deleteMetadata("custom:annotation", Example, "staticProperty");
|
|
477
|
-
*
|
|
478
|
-
* // property (on prototype)
|
|
479
|
-
* result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "property");
|
|
480
|
-
*
|
|
481
|
-
* // method (on constructor)
|
|
482
|
-
* result = Reflect.deleteMetadata("custom:annotation", Example, "staticMethod");
|
|
483
|
-
*
|
|
484
|
-
* // method (on prototype)
|
|
485
|
-
* result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "method");
|
|
486
|
-
*
|
|
487
|
-
*/
|
|
488
|
-
function deleteMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
|
|
489
|
-
}
|
|
1
|
+
import './TypeDef.2.js';
|
|
2
|
+
|
|
3
|
+
declare namespace UnitOfTime {
|
|
4
|
+
type Base = ('year' | 'years' | 'y' | 'month' | 'months' | 'M' | 'week' | 'weeks' | 'w' | 'day' | 'days' | 'd' | 'hour' | 'hours' | 'h' | 'minute' | 'minutes' | 'm' | 'second' | 'seconds' | 's' | 'millisecond' | 'milliseconds' | 'ms');
|
|
5
|
+
type _quarter = 'quarter' | 'quarters' | 'Q';
|
|
6
|
+
type _isoWeek = 'isoWeek' | 'isoWeeks' | 'W';
|
|
7
|
+
type _date = 'date' | 'dates' | 'D';
|
|
8
|
+
type DurationConstructor = Base | _quarter;
|
|
9
|
+
type DurationAs = Base;
|
|
10
|
+
type StartOf = Base | _quarter | _isoWeek | _date | null;
|
|
11
|
+
type Diff = Base | _quarter;
|
|
12
|
+
type MomentConstructor = Base | _date;
|
|
13
|
+
type All = Base | _quarter | _isoWeek | _date | 'weekYear' | 'weekYears' | 'gg' | 'isoWeekYear' | 'isoWeekYears' | 'GG' | 'dayOfYear' | 'dayOfYears' | 'DDD' | 'weekday' | 'weekdays' | 'e' | 'isoWeekday' | 'isoWeekdays' | 'E';
|
|
490
14
|
}
|
|
15
|
+
type TimeInput = Time | Date | string | number | (number | string)[] | null;
|
|
16
|
+
type TimeObject = {
|
|
17
|
+
years: number;
|
|
18
|
+
months: number;
|
|
19
|
+
date: number;
|
|
20
|
+
hours: number;
|
|
21
|
+
minutes: number;
|
|
22
|
+
seconds: number;
|
|
23
|
+
milliseconds: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Time class
|
|
27
|
+
*/
|
|
28
|
+
declare class Time extends Date {
|
|
29
|
+
#private;
|
|
30
|
+
/**
|
|
31
|
+
* Constructor
|
|
32
|
+
* @param inp
|
|
33
|
+
*/
|
|
34
|
+
constructor(inp?: TimeInput);
|
|
35
|
+
/**
|
|
36
|
+
* Get all timezone names
|
|
37
|
+
*/
|
|
38
|
+
static timezones(): string[];
|
|
39
|
+
/**
|
|
40
|
+
* Returns the maximum value for a given instance (farthest into the future)
|
|
41
|
+
* @param times
|
|
42
|
+
*/
|
|
43
|
+
static max(...times: Time[]): Time;
|
|
44
|
+
/**
|
|
45
|
+
* Returns the minimum value (most distant past) of the given instance
|
|
46
|
+
* @param times
|
|
47
|
+
*/
|
|
48
|
+
static min(...times: Time[]): Time;
|
|
49
|
+
/**
|
|
50
|
+
* Update the current instance internal timestamp and return the current instance
|
|
51
|
+
* @param time
|
|
52
|
+
* @protected
|
|
53
|
+
*/
|
|
54
|
+
protected updateTimestamp(time: number): this;
|
|
55
|
+
/**
|
|
56
|
+
* Get time zone offset
|
|
57
|
+
*/
|
|
58
|
+
getTimezoneOffset(): number;
|
|
59
|
+
/**
|
|
60
|
+
* Get or set time zone
|
|
61
|
+
*/
|
|
62
|
+
timezone(): string | undefined;
|
|
63
|
+
timezone(tz: string): this;
|
|
64
|
+
/**
|
|
65
|
+
* Get or set the number of milliseconds
|
|
66
|
+
*/
|
|
67
|
+
milliseconds(): number;
|
|
68
|
+
milliseconds(value: number): this;
|
|
69
|
+
/**
|
|
70
|
+
* Get or set seconds
|
|
71
|
+
*/
|
|
72
|
+
seconds(): number;
|
|
73
|
+
seconds(value: number): this;
|
|
74
|
+
/**
|
|
75
|
+
* Get or set minutes
|
|
76
|
+
*/
|
|
77
|
+
minutes(): number;
|
|
78
|
+
minutes(value: number): this;
|
|
79
|
+
/**
|
|
80
|
+
* Get or set the hour
|
|
81
|
+
*/
|
|
82
|
+
hours(): number;
|
|
83
|
+
hours(value: number): this;
|
|
84
|
+
/**
|
|
85
|
+
* Get or set the day of the month
|
|
86
|
+
* Accepts numbers from 1 to 31. If out of range it will bubble up to months
|
|
87
|
+
*/
|
|
88
|
+
date(): number;
|
|
89
|
+
date(value: number): this;
|
|
90
|
+
/**
|
|
91
|
+
* Set to get or set the day of the week
|
|
92
|
+
*/
|
|
93
|
+
weekday(): number;
|
|
94
|
+
weekday(value: number): this;
|
|
95
|
+
/**
|
|
96
|
+
* Get or set the ISO day of the week, 1 is Monday, 7 is Sunday
|
|
97
|
+
*/
|
|
98
|
+
isoWeekday(): number;
|
|
99
|
+
isoWeekday(value: number): this;
|
|
100
|
+
/**
|
|
101
|
+
* Get or set the day of the year
|
|
102
|
+
* Accepts numbers from 1 to 366. If out of range it will bubble up to the year
|
|
103
|
+
*/
|
|
104
|
+
dayOfYear(): number;
|
|
105
|
+
dayOfYear(value: number): this;
|
|
106
|
+
/**
|
|
107
|
+
* Gets or sets the week of the year
|
|
108
|
+
*/
|
|
109
|
+
weeks(): number;
|
|
110
|
+
weeks(value: number): this;
|
|
111
|
+
/**
|
|
112
|
+
* Gets or sets the ISO week of the year
|
|
113
|
+
*/
|
|
114
|
+
isoWeeks(): number;
|
|
115
|
+
isoWeeks(value: number): this;
|
|
116
|
+
/**
|
|
117
|
+
* Get or set the month
|
|
118
|
+
* Accepts numbers from 0 to 11. If out of range it will bubble up to the year
|
|
119
|
+
*/
|
|
120
|
+
month(): number;
|
|
121
|
+
month(value: number): this;
|
|
122
|
+
/**
|
|
123
|
+
* Gets or sets the quarter (1 to 4)
|
|
124
|
+
*/
|
|
125
|
+
quarters(): number;
|
|
126
|
+
quarters(value: number): this;
|
|
127
|
+
/**
|
|
128
|
+
* Get or set the year
|
|
129
|
+
* Accepts numbers from -270,000 to 270,000
|
|
130
|
+
*/
|
|
131
|
+
year(): number;
|
|
132
|
+
year(value: number): this;
|
|
133
|
+
/**
|
|
134
|
+
* Gets or sets the week of the year in ISO time
|
|
135
|
+
*/
|
|
136
|
+
isoWeekYear(): number;
|
|
137
|
+
isoWeekYear(value: number): this;
|
|
138
|
+
/**
|
|
139
|
+
* Gets the week number based on the locale of the current instance's year
|
|
140
|
+
*/
|
|
141
|
+
weeksInYear(): number;
|
|
142
|
+
/**
|
|
143
|
+
* Get the week number of the year where the current instance is located based on the week number
|
|
144
|
+
*/
|
|
145
|
+
isoWeeksInYear(): number;
|
|
146
|
+
/**
|
|
147
|
+
* Universal getter (Depends on input unit)
|
|
148
|
+
* @param unit
|
|
149
|
+
*/
|
|
150
|
+
get(unit: UnitOfTime.All): number;
|
|
151
|
+
/**
|
|
152
|
+
* Universal setter (Depends on input unit)
|
|
153
|
+
* @param unit
|
|
154
|
+
* @param value
|
|
155
|
+
*/
|
|
156
|
+
set(unit: UnitOfTime.All, value: number): this;
|
|
157
|
+
/**
|
|
158
|
+
* Increase time
|
|
159
|
+
* @param amount
|
|
160
|
+
* @param unit
|
|
161
|
+
*/
|
|
162
|
+
add(amount: number, unit: UnitOfTime.DurationConstructor): this;
|
|
163
|
+
/**
|
|
164
|
+
* Minus time
|
|
165
|
+
* @param amount
|
|
166
|
+
* @param unit
|
|
167
|
+
*/
|
|
168
|
+
subtract(amount: number, unit: UnitOfTime.DurationConstructor): this;
|
|
169
|
+
/**
|
|
170
|
+
* Set to the start of a time unit
|
|
171
|
+
* @param unit
|
|
172
|
+
*/
|
|
173
|
+
startOf(unit: UnitOfTime.StartOf): this;
|
|
174
|
+
/**
|
|
175
|
+
* Set to the end of the time unit
|
|
176
|
+
* @param unit
|
|
177
|
+
*/
|
|
178
|
+
endOf(unit: UnitOfTime.StartOf): this;
|
|
179
|
+
/**
|
|
180
|
+
* Format output time string
|
|
181
|
+
*/
|
|
182
|
+
format(): string;
|
|
183
|
+
format(format: string): string;
|
|
184
|
+
/**
|
|
185
|
+
* Get time difference
|
|
186
|
+
* @param inp
|
|
187
|
+
* @param unit
|
|
188
|
+
* @param precise
|
|
189
|
+
*/
|
|
190
|
+
diff(inp: TimeInput, unit?: UnitOfTime.Diff, precise?: boolean): number;
|
|
191
|
+
/**
|
|
192
|
+
* Outputs a Unix timestamp (number of seconds since the Unix epoch)
|
|
193
|
+
*/
|
|
194
|
+
unix(): number;
|
|
195
|
+
/**
|
|
196
|
+
* Get the number of days in the current month
|
|
197
|
+
*/
|
|
198
|
+
daysInMonth(): number;
|
|
199
|
+
/**
|
|
200
|
+
* This will return an array that reflects the parameters in new Date()
|
|
201
|
+
*/
|
|
202
|
+
toArray(): [number, number, number, number, number, number, number];
|
|
203
|
+
/**
|
|
204
|
+
* Returns an object containing the year, month, day of the month, hour, minute, second, and millisecond
|
|
205
|
+
*/
|
|
206
|
+
toObject(): TimeObject;
|
|
207
|
+
/**
|
|
208
|
+
* To string
|
|
209
|
+
*/
|
|
210
|
+
toString(): string;
|
|
211
|
+
/**
|
|
212
|
+
* To time string
|
|
213
|
+
*/
|
|
214
|
+
toTimeString(): string;
|
|
215
|
+
/**
|
|
216
|
+
* To UTC string
|
|
217
|
+
*/
|
|
218
|
+
toUTCString(): string;
|
|
219
|
+
/**
|
|
220
|
+
* To date string
|
|
221
|
+
*/
|
|
222
|
+
toDateString(): string;
|
|
223
|
+
/**
|
|
224
|
+
* Return ISO format time string
|
|
225
|
+
*/
|
|
226
|
+
toISOString(): string;
|
|
227
|
+
/**
|
|
228
|
+
* Is current time before input time
|
|
229
|
+
* @param inp
|
|
230
|
+
* @param granularity
|
|
231
|
+
*/
|
|
232
|
+
isBefore(inp?: TimeInput, granularity?: UnitOfTime.StartOf): boolean;
|
|
233
|
+
/**
|
|
234
|
+
* Is current time same with input time
|
|
235
|
+
* @param inp
|
|
236
|
+
* @param granularity
|
|
237
|
+
*/
|
|
238
|
+
isSame(inp?: TimeInput, granularity?: UnitOfTime.StartOf): boolean;
|
|
239
|
+
/**
|
|
240
|
+
* Is current time after input time
|
|
241
|
+
* @param inp
|
|
242
|
+
* @param granularity
|
|
243
|
+
*/
|
|
244
|
+
isAfter(inp?: TimeInput, granularity?: UnitOfTime.StartOf): boolean;
|
|
245
|
+
/**
|
|
246
|
+
* Is current time same or before input time
|
|
247
|
+
* @param inp
|
|
248
|
+
* @param granularity
|
|
249
|
+
*/
|
|
250
|
+
isSameOrBefore(inp?: TimeInput, granularity?: UnitOfTime.StartOf): boolean;
|
|
251
|
+
/**
|
|
252
|
+
* Is current time same or after input time
|
|
253
|
+
* @param inp
|
|
254
|
+
* @param granularity
|
|
255
|
+
*/
|
|
256
|
+
isSameOrAfter(inp?: TimeInput, granularity?: UnitOfTime.StartOf): boolean;
|
|
257
|
+
/**
|
|
258
|
+
* Is current time between two input times
|
|
259
|
+
* @param a
|
|
260
|
+
* @param b
|
|
261
|
+
* @param granularity
|
|
262
|
+
* @param inclusivity
|
|
263
|
+
*/
|
|
264
|
+
isBetween(a: TimeInput, b: TimeInput, granularity?: UnitOfTime.StartOf, inclusivity?: '()' | '[)' | '(]' | '[]'): boolean;
|
|
265
|
+
/**
|
|
266
|
+
* Check current time instance is leap year
|
|
267
|
+
*/
|
|
268
|
+
isLeapYear(): boolean;
|
|
269
|
+
/**
|
|
270
|
+
* Clone a time instance
|
|
271
|
+
*/
|
|
272
|
+
clone(): Time;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export { Time as T };
|