@dipscope/type-manager 4.1.0 → 4.1.1
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/CHANGELOG.md +197 -197
- package/{LICENSE.txt → LICENSE.md} +201 -201
- package/README.md +2037 -2020
- package/alias.d.ts +10 -10
- package/core/alias.d.ts +6 -6
- package/core/custom-data.d.ts +6 -6
- package/core/default-value-resolver.d.ts +7 -7
- package/core/default-value.d.ts +7 -7
- package/core/discriminant.d.ts +8 -8
- package/core/discriminator.d.ts +6 -6
- package/core/factory.d.ts +18 -18
- package/core/fn.d.ts +316 -316
- package/core/generic-argument.d.ts +7 -7
- package/core/generic-metadata.d.ts +7 -7
- package/core/index.d.ts +44 -44
- package/core/index.js +1 -1
- package/core/index.js.map +1 -0
- package/core/inject-index.d.ts +6 -6
- package/core/inject-metadata.d.ts +72 -72
- package/core/inject-options.d.ts +22 -22
- package/core/injector.d.ts +16 -16
- package/core/log-level.d.ts +11 -11
- package/core/log.d.ts +65 -65
- package/core/metadata.d.ts +42 -42
- package/core/naming-convention.d.ts +15 -15
- package/core/property-metadata.d.ts +178 -178
- package/core/property-name.d.ts +6 -6
- package/core/property-options.d.ts +100 -100
- package/core/reference-callback.d.ts +7 -7
- package/core/reference-handler.d.ts +32 -32
- package/core/reference-key.d.ts +6 -6
- package/core/reference-value-initializer.d.ts +8 -8
- package/core/reference-value-resolver.d.ts +8 -8
- package/core/reference-value.d.ts +6 -6
- package/core/serializer-context-options.d.ts +63 -63
- package/core/serializer-context.d.ts +296 -296
- package/core/serializer.d.ts +27 -27
- package/core/type-abstraction.d.ts +8 -8
- package/core/type-argument.d.ts +9 -9
- package/core/type-context-entry.d.ts +36 -36
- package/core/type-context.d.ts +58 -58
- package/core/type-ctor.d.ts +6 -6
- package/core/type-fn.d.ts +8 -8
- package/core/type-like.d.ts +7 -7
- package/core/type-metadata-resolver.d.ts +8 -8
- package/core/type-metadata-symbol.d.ts +6 -6
- package/core/type-metadata.d.ts +304 -304
- package/core/type-name.d.ts +6 -6
- package/core/type-options-base.d.ts +100 -100
- package/core/type-options.d.ts +53 -53
- package/core/type-resolver.d.ts +7 -7
- package/custom-data.d.ts +11 -11
- package/default-value.d.ts +11 -11
- package/deserializable.d.ts +11 -11
- package/deserialized-default-value.d.ts +11 -11
- package/discriminant.d.ts +11 -11
- package/discriminator.d.ts +11 -11
- package/factories/index.d.ts +1 -1
- package/factories/index.js +1 -1
- package/factories/index.js.map +1 -0
- package/factories/type-factory.d.ts +19 -19
- package/factory.d.ts +11 -11
- package/index.d.ts +24 -24
- package/index.js +1 -1
- package/index.js.map +1 -0
- package/inject.d.ts +10 -10
- package/injectable.d.ts +10 -10
- package/injector.d.ts +11 -11
- package/injectors/index.d.ts +1 -1
- package/injectors/index.js +1 -1
- package/injectors/index.js.map +1 -0
- package/injectors/singleton-injector.d.ts +31 -31
- package/naming-convention.d.ts +11 -11
- package/naming-conventions/camel-case-naming-convention.d.ts +26 -26
- package/naming-conventions/flat-case-naming-convention.d.ts +25 -25
- package/naming-conventions/flat-upper-case-naming-convention.d.ts +25 -25
- package/naming-conventions/index.d.ts +8 -8
- package/naming-conventions/index.js +1 -1
- package/naming-conventions/index.js.map +1 -0
- package/naming-conventions/kebab-case-naming-convention.d.ts +26 -26
- package/naming-conventions/kebab-upper-case-naming-convention.d.ts +26 -26
- package/naming-conventions/pascal-case-naming-convention.d.ts +26 -26
- package/naming-conventions/snake-case-naming-convention.d.ts +26 -26
- package/naming-conventions/snake-upper-case-naming-convention.d.ts +26 -26
- package/package.json +48 -48
- package/preserve-discriminator.d.ts +10 -10
- package/property.d.ts +12 -12
- package/reference-handler.d.ts +11 -11
- package/reference-handlers/direct-reference-handler.d.ts +33 -33
- package/reference-handlers/index.d.ts +3 -3
- package/reference-handlers/index.js +1 -1
- package/reference-handlers/index.js.map +1 -0
- package/reference-handlers/lead-reference-handler.d.ts +34 -34
- package/reference-handlers/path-reference-handler.d.ts +56 -56
- package/serializable.d.ts +11 -11
- package/serialized-default-value.d.ts +11 -11
- package/serializer.d.ts +11 -11
- package/serializers/array-buffer-serializer.d.ts +28 -28
- package/serializers/array-serializer.d.ts +28 -28
- package/serializers/boolean-serializer.d.ts +37 -37
- package/serializers/data-view-serializer.d.ts +28 -28
- package/serializers/date-serializer.d.ts +28 -28
- package/serializers/float-32-array-serializer.d.ts +28 -28
- package/serializers/float-64-array-serializer.d.ts +28 -28
- package/serializers/index.d.ts +19 -19
- package/serializers/index.js +1 -1
- package/serializers/index.js.map +1 -0
- package/serializers/int-16-array-serializer.d.ts +28 -28
- package/serializers/int-32-array-serializer.d.ts +28 -28
- package/serializers/int-8-array-serializer.d.ts +28 -28
- package/serializers/map-serializer.d.ts +28 -28
- package/serializers/number-serializer.d.ts +37 -37
- package/serializers/set-serializer.d.ts +28 -28
- package/serializers/string-serializer.d.ts +37 -37
- package/serializers/type-serializer.d.ts +28 -28
- package/serializers/uint-16-array-serializer.d.ts +28 -28
- package/serializers/uint-32-array-serializer.d.ts +28 -28
- package/serializers/uint-8-array-serializer.d.ts +28 -28
- package/serializers/uint-8-clamped-array-serializer.d.ts +28 -28
- package/type-and-property.d.ts +12 -12
- package/type-manager-options.d.ts +24 -24
- package/type-manager.d.ts +331 -331
- package/type.d.ts +9 -9
- package/use-default-value.d.ts +10 -10
- package/use-implicit-conversion.d.ts +10 -10
package/core/fn.d.ts
CHANGED
|
@@ -1,316 +1,316 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Helper class to encapsulate commonly used functions.
|
|
3
|
-
*
|
|
4
|
-
* @type {Fn}
|
|
5
|
-
*/
|
|
6
|
-
export declare class Fn {
|
|
7
|
-
/**
|
|
8
|
-
* Checks if value is null or undefined.
|
|
9
|
-
*
|
|
10
|
-
* @param {any} x Input value.
|
|
11
|
-
*
|
|
12
|
-
* @returns {boolean} True when value is null or undefined. False otherwise.
|
|
13
|
-
*/
|
|
14
|
-
static isNil(x: any): x is null | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* Checks if value is null.
|
|
17
|
-
*
|
|
18
|
-
* @param {any} x Input value.
|
|
19
|
-
*
|
|
20
|
-
* @returns {boolean} True when value is null. False otherwise.
|
|
21
|
-
*/
|
|
22
|
-
static isNull(x: any): x is null;
|
|
23
|
-
/**
|
|
24
|
-
* Checks if value is undefined.
|
|
25
|
-
*
|
|
26
|
-
* @param {any} x Input value.
|
|
27
|
-
*
|
|
28
|
-
* @returns {boolean} True when value is undefined. False otherwise.
|
|
29
|
-
*/
|
|
30
|
-
static isUndefined(x: any): x is undefined;
|
|
31
|
-
/**
|
|
32
|
-
* Checks if value is object.
|
|
33
|
-
*
|
|
34
|
-
* @param {any} x Input value.
|
|
35
|
-
*
|
|
36
|
-
* @returns {boolean} True when value is object. False otherwise.
|
|
37
|
-
*/
|
|
38
|
-
static isObject(x: any): x is Record<string, any>;
|
|
39
|
-
/**
|
|
40
|
-
* Checks if value is a plain object.
|
|
41
|
-
*
|
|
42
|
-
* @param {any} x Input value.
|
|
43
|
-
*
|
|
44
|
-
* @returns {boolean} True when value is a plain object. False otherwise.
|
|
45
|
-
*/
|
|
46
|
-
static isPlainObject(x: any): x is Record<string, any>;
|
|
47
|
-
/**
|
|
48
|
-
* Checks if value is function.
|
|
49
|
-
*
|
|
50
|
-
* @param {any} x Input value.
|
|
51
|
-
*
|
|
52
|
-
* @returns {boolean} True when value is function. False otherwise.
|
|
53
|
-
*/
|
|
54
|
-
static isFunction(x: any): x is (...args: Array<any>) => any;
|
|
55
|
-
/**
|
|
56
|
-
* Checks if value is an arrow function.
|
|
57
|
-
*
|
|
58
|
-
* @param {any} x Input value.
|
|
59
|
-
*
|
|
60
|
-
* @returns {boolean} True when value is an arrow function. False otherwise.
|
|
61
|
-
*/
|
|
62
|
-
static isArrowFunction(x: any): x is (...args: Array<any>) => any;
|
|
63
|
-
/**
|
|
64
|
-
* Checks if value is a constructor.
|
|
65
|
-
*
|
|
66
|
-
* @param {any} x Input value.
|
|
67
|
-
*
|
|
68
|
-
* @returns {boolean} True when value is a constructor. False otherwise.
|
|
69
|
-
*/
|
|
70
|
-
static isCtor(x: any): x is new (...args: Array<any>) => any;
|
|
71
|
-
/**
|
|
72
|
-
* Checks if value is string.
|
|
73
|
-
*
|
|
74
|
-
* @param {any} x Input value.
|
|
75
|
-
*
|
|
76
|
-
* @returns {boolean} True when value is string. False otherwise.
|
|
77
|
-
*/
|
|
78
|
-
static isString(x: any): x is string;
|
|
79
|
-
/**
|
|
80
|
-
* Checks if value is number.
|
|
81
|
-
*
|
|
82
|
-
* @param {any} x Input value.
|
|
83
|
-
*
|
|
84
|
-
* @returns {boolean} True when value is number. False otherwise.
|
|
85
|
-
*/
|
|
86
|
-
static isNumber(x: any): x is number;
|
|
87
|
-
/**
|
|
88
|
-
* Checks if value is symbol.
|
|
89
|
-
*
|
|
90
|
-
* @param {any} x Input value.
|
|
91
|
-
*
|
|
92
|
-
* @returns {boolean} True when value is symbol. False otherwise.
|
|
93
|
-
*/
|
|
94
|
-
static isSymbol(x: any): x is symbol;
|
|
95
|
-
/**
|
|
96
|
-
* Checks if value is boolean.
|
|
97
|
-
*
|
|
98
|
-
* @param {any} x Input value.
|
|
99
|
-
*
|
|
100
|
-
* @returns {boolean} True when value is boolean. False otherwise.
|
|
101
|
-
*/
|
|
102
|
-
static isBoolean(x: any): x is boolean;
|
|
103
|
-
/**
|
|
104
|
-
* Checks if value is array.
|
|
105
|
-
*
|
|
106
|
-
* @param {any} x Input value.
|
|
107
|
-
*
|
|
108
|
-
* @returns {boolean} True when value is array. False otherwise.
|
|
109
|
-
*/
|
|
110
|
-
static isArray(x: any): x is Array<any>;
|
|
111
|
-
/**
|
|
112
|
-
* Checks if value is date.
|
|
113
|
-
*
|
|
114
|
-
* @param {any} x Input value.
|
|
115
|
-
*
|
|
116
|
-
* @returns {boolean} True when value is date. False otherwise.
|
|
117
|
-
*/
|
|
118
|
-
static isDate(x: any): x is Date;
|
|
119
|
-
/**
|
|
120
|
-
* Checks if value is array buffer.
|
|
121
|
-
*
|
|
122
|
-
* @param {any} x Input value.
|
|
123
|
-
*
|
|
124
|
-
* @returns {boolean} True when value is array buffer. False otherwise.
|
|
125
|
-
*/
|
|
126
|
-
static isArrayBuffer(x: any): x is ArrayBuffer;
|
|
127
|
-
/**
|
|
128
|
-
* Checks if value is data view.
|
|
129
|
-
*
|
|
130
|
-
* @param {any} x Input value.
|
|
131
|
-
*
|
|
132
|
-
* @returns {boolean} True when value is data view. False otherwise.
|
|
133
|
-
*/
|
|
134
|
-
static isDataView(x: any): x is DataView;
|
|
135
|
-
/**
|
|
136
|
-
* Checks if value is float 32 array.
|
|
137
|
-
*
|
|
138
|
-
* @param {any} x Input value.
|
|
139
|
-
*
|
|
140
|
-
* @returns {boolean} True when value is float 32 array. False otherwise.
|
|
141
|
-
*/
|
|
142
|
-
static isFloat32Array(x: any): x is Float32Array;
|
|
143
|
-
/**
|
|
144
|
-
* Checks if value is float 64 array.
|
|
145
|
-
*
|
|
146
|
-
* @param {any} x Input value.
|
|
147
|
-
*
|
|
148
|
-
* @returns {boolean} True when value is float 64 array. False otherwise.
|
|
149
|
-
*/
|
|
150
|
-
static isFloat64Array(x: any): x is Float64Array;
|
|
151
|
-
/**
|
|
152
|
-
* Checks if value is int 8 array.
|
|
153
|
-
*
|
|
154
|
-
* @param {any} x Input value.
|
|
155
|
-
*
|
|
156
|
-
* @returns {boolean} True when value is int 8 array. False otherwise.
|
|
157
|
-
*/
|
|
158
|
-
static isInt8Array(x: any): x is Int8Array;
|
|
159
|
-
/**
|
|
160
|
-
* Checks if value is int 16 array.
|
|
161
|
-
*
|
|
162
|
-
* @param {any} x Input value.
|
|
163
|
-
*
|
|
164
|
-
* @returns {boolean} True when value is int 16 array. False otherwise.
|
|
165
|
-
*/
|
|
166
|
-
static isInt16Array(x: any): x is Int16Array;
|
|
167
|
-
/**
|
|
168
|
-
* Checks if value is int 32 array.
|
|
169
|
-
*
|
|
170
|
-
* @param {any} x Input value.
|
|
171
|
-
*
|
|
172
|
-
* @returns {boolean} True when value is int 32 array. False otherwise.
|
|
173
|
-
*/
|
|
174
|
-
static isInt32Array(x: any): x is Int32Array;
|
|
175
|
-
/**
|
|
176
|
-
* Checks if value is map.
|
|
177
|
-
*
|
|
178
|
-
* @param {any} x Input value.
|
|
179
|
-
*
|
|
180
|
-
* @returns {boolean} True when value is map. False otherwise.
|
|
181
|
-
*/
|
|
182
|
-
static isMap(x: any): x is Map<any, any>;
|
|
183
|
-
/**
|
|
184
|
-
* Checks if value is set.
|
|
185
|
-
*
|
|
186
|
-
* @param {any} x Input value.
|
|
187
|
-
*
|
|
188
|
-
* @returns {boolean} True when value is set. False otherwise.
|
|
189
|
-
*/
|
|
190
|
-
static isSet(x: any): x is Set<any>;
|
|
191
|
-
/**
|
|
192
|
-
* Checks if value is uint 8 array.
|
|
193
|
-
*
|
|
194
|
-
* @param {any} x Input value.
|
|
195
|
-
*
|
|
196
|
-
* @returns {boolean} True when value is uint 8 array. False otherwise.
|
|
197
|
-
*/
|
|
198
|
-
static isUint8Array(x: any): x is Uint8Array;
|
|
199
|
-
/**
|
|
200
|
-
* Checks if value is uint 8 clamped array.
|
|
201
|
-
*
|
|
202
|
-
* @param {any} x Input value.
|
|
203
|
-
*
|
|
204
|
-
* @returns {boolean} True when value is uint 8 clamped array. False otherwise.
|
|
205
|
-
*/
|
|
206
|
-
static isUint8ClampedArray(x: any): x is Uint8ClampedArray;
|
|
207
|
-
/**
|
|
208
|
-
* Checks if value is uint 16 array.
|
|
209
|
-
*
|
|
210
|
-
* @param {any} x Input value.
|
|
211
|
-
*
|
|
212
|
-
* @returns {boolean} True when value is uint 16 array. False otherwise.
|
|
213
|
-
*/
|
|
214
|
-
static isUint16Array(x: any): x is Uint16Array;
|
|
215
|
-
/**
|
|
216
|
-
* Checks if value is uint 32 array.
|
|
217
|
-
*
|
|
218
|
-
* @param {any} x Input value.
|
|
219
|
-
*
|
|
220
|
-
* @returns {boolean} True when value is uint 32 array. False otherwise.
|
|
221
|
-
*/
|
|
222
|
-
static isUint32Array(x: any): x is Uint32Array;
|
|
223
|
-
/**
|
|
224
|
-
* Checks if value is weak map.
|
|
225
|
-
*
|
|
226
|
-
* @param {any} x Input value.
|
|
227
|
-
*
|
|
228
|
-
* @returns {boolean} True when value is weak map. False otherwise.
|
|
229
|
-
*/
|
|
230
|
-
static isWeakMap(x: any): x is WeakMap<any, any>;
|
|
231
|
-
/**
|
|
232
|
-
* Checks if value is weak set.
|
|
233
|
-
*
|
|
234
|
-
* @param {any} x Input value.
|
|
235
|
-
*
|
|
236
|
-
* @returns {boolean} True when value is weak set. False otherwise.
|
|
237
|
-
*/
|
|
238
|
-
static isWeakSet(x: any): x is WeakSet<any>;
|
|
239
|
-
/**
|
|
240
|
-
* Checks if provided value is empty.
|
|
241
|
-
*
|
|
242
|
-
* @param {any} x Input value.
|
|
243
|
-
*
|
|
244
|
-
* @returns {boolean} True when value is empty. False otherwise.
|
|
245
|
-
*/
|
|
246
|
-
static isEmpty(x: any): boolean;
|
|
247
|
-
/**
|
|
248
|
-
* Performs deep assignment and returns target object.
|
|
249
|
-
*
|
|
250
|
-
* @param {Record<string, any>} target Target object.
|
|
251
|
-
* @param {Array<Record<string, any>>} sources Source objects.
|
|
252
|
-
*
|
|
253
|
-
* @returns {Record<string, any>} Target object.
|
|
254
|
-
*/
|
|
255
|
-
static assign<T, U>(target: T, source: U): T & U;
|
|
256
|
-
static assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
|
|
257
|
-
static assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
|
|
258
|
-
/**
|
|
259
|
-
* Defines name for any value.
|
|
260
|
-
*
|
|
261
|
-
* @param {any} x Input value.
|
|
262
|
-
*
|
|
263
|
-
* @returns {boolean} Name when present. Unknown otherwise.
|
|
264
|
-
*/
|
|
265
|
-
static nameOf(x: any): string;
|
|
266
|
-
/**
|
|
267
|
-
* Splits a Unicode string into an array of its words.
|
|
268
|
-
*
|
|
269
|
-
* @param {string} x String.
|
|
270
|
-
*
|
|
271
|
-
* @returns {Array<string>} Array with the words of provided string.
|
|
272
|
-
*/
|
|
273
|
-
static unicodeWords(x: string): Array<string>;
|
|
274
|
-
/**
|
|
275
|
-
* Splits a ASCII string into an array of its words.
|
|
276
|
-
*
|
|
277
|
-
* @param {string} x String.
|
|
278
|
-
*
|
|
279
|
-
* @returns {Array<string>} Array with the words of provided string.
|
|
280
|
-
*/
|
|
281
|
-
static asciiWords(x: string): Array<string>;
|
|
282
|
-
/**
|
|
283
|
-
* Splits string into an array of its words.
|
|
284
|
-
*
|
|
285
|
-
* @param {string} x String.
|
|
286
|
-
*
|
|
287
|
-
* @returns {Array<string>} Array with the words of provided string.
|
|
288
|
-
*/
|
|
289
|
-
static words(x: string): Array<string>;
|
|
290
|
-
/**
|
|
291
|
-
* Checks if reflect metadata is supported.
|
|
292
|
-
*
|
|
293
|
-
* @returns {boolean} True when supported. False otherwise.
|
|
294
|
-
*/
|
|
295
|
-
static isReflectMetadataSupported(): boolean;
|
|
296
|
-
/**
|
|
297
|
-
* Extracts reflect metadata.
|
|
298
|
-
*
|
|
299
|
-
* @param {string} metadataKey Unique metadata key.
|
|
300
|
-
* @param {any} target Target to extract from.
|
|
301
|
-
* @param {string|symbol} targetKey Key in a target.
|
|
302
|
-
*
|
|
303
|
-
* @returns {any} Metadata for a key or undefined if metadata is not present.
|
|
304
|
-
*/
|
|
305
|
-
static extractReflectMetadata(metadataKey: string, target: any, targetKey?: string | symbol): any;
|
|
306
|
-
/**
|
|
307
|
-
* Extracts own reflect metadata.
|
|
308
|
-
*
|
|
309
|
-
* @param {string} metadataKey Unique metadata key.
|
|
310
|
-
* @param {any} target Target to extract from.
|
|
311
|
-
* @param {string|symbol} targetKey Key in a target.
|
|
312
|
-
*
|
|
313
|
-
* @returns {any} Metadata for a key or undefined if metadata is not present.
|
|
314
|
-
*/
|
|
315
|
-
static extractOwnReflectMetadata(metadataKey: string, target: any, targetKey?: string | symbol): any;
|
|
316
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Helper class to encapsulate commonly used functions.
|
|
3
|
+
*
|
|
4
|
+
* @type {Fn}
|
|
5
|
+
*/
|
|
6
|
+
export declare class Fn {
|
|
7
|
+
/**
|
|
8
|
+
* Checks if value is null or undefined.
|
|
9
|
+
*
|
|
10
|
+
* @param {any} x Input value.
|
|
11
|
+
*
|
|
12
|
+
* @returns {boolean} True when value is null or undefined. False otherwise.
|
|
13
|
+
*/
|
|
14
|
+
static isNil(x: any): x is null | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Checks if value is null.
|
|
17
|
+
*
|
|
18
|
+
* @param {any} x Input value.
|
|
19
|
+
*
|
|
20
|
+
* @returns {boolean} True when value is null. False otherwise.
|
|
21
|
+
*/
|
|
22
|
+
static isNull(x: any): x is null;
|
|
23
|
+
/**
|
|
24
|
+
* Checks if value is undefined.
|
|
25
|
+
*
|
|
26
|
+
* @param {any} x Input value.
|
|
27
|
+
*
|
|
28
|
+
* @returns {boolean} True when value is undefined. False otherwise.
|
|
29
|
+
*/
|
|
30
|
+
static isUndefined(x: any): x is undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Checks if value is object.
|
|
33
|
+
*
|
|
34
|
+
* @param {any} x Input value.
|
|
35
|
+
*
|
|
36
|
+
* @returns {boolean} True when value is object. False otherwise.
|
|
37
|
+
*/
|
|
38
|
+
static isObject(x: any): x is Record<string, any>;
|
|
39
|
+
/**
|
|
40
|
+
* Checks if value is a plain object.
|
|
41
|
+
*
|
|
42
|
+
* @param {any} x Input value.
|
|
43
|
+
*
|
|
44
|
+
* @returns {boolean} True when value is a plain object. False otherwise.
|
|
45
|
+
*/
|
|
46
|
+
static isPlainObject(x: any): x is Record<string, any>;
|
|
47
|
+
/**
|
|
48
|
+
* Checks if value is function.
|
|
49
|
+
*
|
|
50
|
+
* @param {any} x Input value.
|
|
51
|
+
*
|
|
52
|
+
* @returns {boolean} True when value is function. False otherwise.
|
|
53
|
+
*/
|
|
54
|
+
static isFunction(x: any): x is (...args: Array<any>) => any;
|
|
55
|
+
/**
|
|
56
|
+
* Checks if value is an arrow function.
|
|
57
|
+
*
|
|
58
|
+
* @param {any} x Input value.
|
|
59
|
+
*
|
|
60
|
+
* @returns {boolean} True when value is an arrow function. False otherwise.
|
|
61
|
+
*/
|
|
62
|
+
static isArrowFunction(x: any): x is (...args: Array<any>) => any;
|
|
63
|
+
/**
|
|
64
|
+
* Checks if value is a constructor.
|
|
65
|
+
*
|
|
66
|
+
* @param {any} x Input value.
|
|
67
|
+
*
|
|
68
|
+
* @returns {boolean} True when value is a constructor. False otherwise.
|
|
69
|
+
*/
|
|
70
|
+
static isCtor(x: any): x is new (...args: Array<any>) => any;
|
|
71
|
+
/**
|
|
72
|
+
* Checks if value is string.
|
|
73
|
+
*
|
|
74
|
+
* @param {any} x Input value.
|
|
75
|
+
*
|
|
76
|
+
* @returns {boolean} True when value is string. False otherwise.
|
|
77
|
+
*/
|
|
78
|
+
static isString(x: any): x is string;
|
|
79
|
+
/**
|
|
80
|
+
* Checks if value is number.
|
|
81
|
+
*
|
|
82
|
+
* @param {any} x Input value.
|
|
83
|
+
*
|
|
84
|
+
* @returns {boolean} True when value is number. False otherwise.
|
|
85
|
+
*/
|
|
86
|
+
static isNumber(x: any): x is number;
|
|
87
|
+
/**
|
|
88
|
+
* Checks if value is symbol.
|
|
89
|
+
*
|
|
90
|
+
* @param {any} x Input value.
|
|
91
|
+
*
|
|
92
|
+
* @returns {boolean} True when value is symbol. False otherwise.
|
|
93
|
+
*/
|
|
94
|
+
static isSymbol(x: any): x is symbol;
|
|
95
|
+
/**
|
|
96
|
+
* Checks if value is boolean.
|
|
97
|
+
*
|
|
98
|
+
* @param {any} x Input value.
|
|
99
|
+
*
|
|
100
|
+
* @returns {boolean} True when value is boolean. False otherwise.
|
|
101
|
+
*/
|
|
102
|
+
static isBoolean(x: any): x is boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Checks if value is array.
|
|
105
|
+
*
|
|
106
|
+
* @param {any} x Input value.
|
|
107
|
+
*
|
|
108
|
+
* @returns {boolean} True when value is array. False otherwise.
|
|
109
|
+
*/
|
|
110
|
+
static isArray(x: any): x is Array<any>;
|
|
111
|
+
/**
|
|
112
|
+
* Checks if value is date.
|
|
113
|
+
*
|
|
114
|
+
* @param {any} x Input value.
|
|
115
|
+
*
|
|
116
|
+
* @returns {boolean} True when value is date. False otherwise.
|
|
117
|
+
*/
|
|
118
|
+
static isDate(x: any): x is Date;
|
|
119
|
+
/**
|
|
120
|
+
* Checks if value is array buffer.
|
|
121
|
+
*
|
|
122
|
+
* @param {any} x Input value.
|
|
123
|
+
*
|
|
124
|
+
* @returns {boolean} True when value is array buffer. False otherwise.
|
|
125
|
+
*/
|
|
126
|
+
static isArrayBuffer(x: any): x is ArrayBuffer;
|
|
127
|
+
/**
|
|
128
|
+
* Checks if value is data view.
|
|
129
|
+
*
|
|
130
|
+
* @param {any} x Input value.
|
|
131
|
+
*
|
|
132
|
+
* @returns {boolean} True when value is data view. False otherwise.
|
|
133
|
+
*/
|
|
134
|
+
static isDataView(x: any): x is DataView;
|
|
135
|
+
/**
|
|
136
|
+
* Checks if value is float 32 array.
|
|
137
|
+
*
|
|
138
|
+
* @param {any} x Input value.
|
|
139
|
+
*
|
|
140
|
+
* @returns {boolean} True when value is float 32 array. False otherwise.
|
|
141
|
+
*/
|
|
142
|
+
static isFloat32Array(x: any): x is Float32Array;
|
|
143
|
+
/**
|
|
144
|
+
* Checks if value is float 64 array.
|
|
145
|
+
*
|
|
146
|
+
* @param {any} x Input value.
|
|
147
|
+
*
|
|
148
|
+
* @returns {boolean} True when value is float 64 array. False otherwise.
|
|
149
|
+
*/
|
|
150
|
+
static isFloat64Array(x: any): x is Float64Array;
|
|
151
|
+
/**
|
|
152
|
+
* Checks if value is int 8 array.
|
|
153
|
+
*
|
|
154
|
+
* @param {any} x Input value.
|
|
155
|
+
*
|
|
156
|
+
* @returns {boolean} True when value is int 8 array. False otherwise.
|
|
157
|
+
*/
|
|
158
|
+
static isInt8Array(x: any): x is Int8Array;
|
|
159
|
+
/**
|
|
160
|
+
* Checks if value is int 16 array.
|
|
161
|
+
*
|
|
162
|
+
* @param {any} x Input value.
|
|
163
|
+
*
|
|
164
|
+
* @returns {boolean} True when value is int 16 array. False otherwise.
|
|
165
|
+
*/
|
|
166
|
+
static isInt16Array(x: any): x is Int16Array;
|
|
167
|
+
/**
|
|
168
|
+
* Checks if value is int 32 array.
|
|
169
|
+
*
|
|
170
|
+
* @param {any} x Input value.
|
|
171
|
+
*
|
|
172
|
+
* @returns {boolean} True when value is int 32 array. False otherwise.
|
|
173
|
+
*/
|
|
174
|
+
static isInt32Array(x: any): x is Int32Array;
|
|
175
|
+
/**
|
|
176
|
+
* Checks if value is map.
|
|
177
|
+
*
|
|
178
|
+
* @param {any} x Input value.
|
|
179
|
+
*
|
|
180
|
+
* @returns {boolean} True when value is map. False otherwise.
|
|
181
|
+
*/
|
|
182
|
+
static isMap(x: any): x is Map<any, any>;
|
|
183
|
+
/**
|
|
184
|
+
* Checks if value is set.
|
|
185
|
+
*
|
|
186
|
+
* @param {any} x Input value.
|
|
187
|
+
*
|
|
188
|
+
* @returns {boolean} True when value is set. False otherwise.
|
|
189
|
+
*/
|
|
190
|
+
static isSet(x: any): x is Set<any>;
|
|
191
|
+
/**
|
|
192
|
+
* Checks if value is uint 8 array.
|
|
193
|
+
*
|
|
194
|
+
* @param {any} x Input value.
|
|
195
|
+
*
|
|
196
|
+
* @returns {boolean} True when value is uint 8 array. False otherwise.
|
|
197
|
+
*/
|
|
198
|
+
static isUint8Array(x: any): x is Uint8Array;
|
|
199
|
+
/**
|
|
200
|
+
* Checks if value is uint 8 clamped array.
|
|
201
|
+
*
|
|
202
|
+
* @param {any} x Input value.
|
|
203
|
+
*
|
|
204
|
+
* @returns {boolean} True when value is uint 8 clamped array. False otherwise.
|
|
205
|
+
*/
|
|
206
|
+
static isUint8ClampedArray(x: any): x is Uint8ClampedArray;
|
|
207
|
+
/**
|
|
208
|
+
* Checks if value is uint 16 array.
|
|
209
|
+
*
|
|
210
|
+
* @param {any} x Input value.
|
|
211
|
+
*
|
|
212
|
+
* @returns {boolean} True when value is uint 16 array. False otherwise.
|
|
213
|
+
*/
|
|
214
|
+
static isUint16Array(x: any): x is Uint16Array;
|
|
215
|
+
/**
|
|
216
|
+
* Checks if value is uint 32 array.
|
|
217
|
+
*
|
|
218
|
+
* @param {any} x Input value.
|
|
219
|
+
*
|
|
220
|
+
* @returns {boolean} True when value is uint 32 array. False otherwise.
|
|
221
|
+
*/
|
|
222
|
+
static isUint32Array(x: any): x is Uint32Array;
|
|
223
|
+
/**
|
|
224
|
+
* Checks if value is weak map.
|
|
225
|
+
*
|
|
226
|
+
* @param {any} x Input value.
|
|
227
|
+
*
|
|
228
|
+
* @returns {boolean} True when value is weak map. False otherwise.
|
|
229
|
+
*/
|
|
230
|
+
static isWeakMap(x: any): x is WeakMap<any, any>;
|
|
231
|
+
/**
|
|
232
|
+
* Checks if value is weak set.
|
|
233
|
+
*
|
|
234
|
+
* @param {any} x Input value.
|
|
235
|
+
*
|
|
236
|
+
* @returns {boolean} True when value is weak set. False otherwise.
|
|
237
|
+
*/
|
|
238
|
+
static isWeakSet(x: any): x is WeakSet<any>;
|
|
239
|
+
/**
|
|
240
|
+
* Checks if provided value is empty.
|
|
241
|
+
*
|
|
242
|
+
* @param {any} x Input value.
|
|
243
|
+
*
|
|
244
|
+
* @returns {boolean} True when value is empty. False otherwise.
|
|
245
|
+
*/
|
|
246
|
+
static isEmpty(x: any): boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Performs deep assignment and returns target object.
|
|
249
|
+
*
|
|
250
|
+
* @param {Record<string, any>} target Target object.
|
|
251
|
+
* @param {Array<Record<string, any>>} sources Source objects.
|
|
252
|
+
*
|
|
253
|
+
* @returns {Record<string, any>} Target object.
|
|
254
|
+
*/
|
|
255
|
+
static assign<T, U>(target: T, source: U): T & U;
|
|
256
|
+
static assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
|
|
257
|
+
static assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
|
|
258
|
+
/**
|
|
259
|
+
* Defines name for any value.
|
|
260
|
+
*
|
|
261
|
+
* @param {any} x Input value.
|
|
262
|
+
*
|
|
263
|
+
* @returns {boolean} Name when present. Unknown otherwise.
|
|
264
|
+
*/
|
|
265
|
+
static nameOf(x: any): string;
|
|
266
|
+
/**
|
|
267
|
+
* Splits a Unicode string into an array of its words.
|
|
268
|
+
*
|
|
269
|
+
* @param {string} x String.
|
|
270
|
+
*
|
|
271
|
+
* @returns {Array<string>} Array with the words of provided string.
|
|
272
|
+
*/
|
|
273
|
+
static unicodeWords(x: string): Array<string>;
|
|
274
|
+
/**
|
|
275
|
+
* Splits a ASCII string into an array of its words.
|
|
276
|
+
*
|
|
277
|
+
* @param {string} x String.
|
|
278
|
+
*
|
|
279
|
+
* @returns {Array<string>} Array with the words of provided string.
|
|
280
|
+
*/
|
|
281
|
+
static asciiWords(x: string): Array<string>;
|
|
282
|
+
/**
|
|
283
|
+
* Splits string into an array of its words.
|
|
284
|
+
*
|
|
285
|
+
* @param {string} x String.
|
|
286
|
+
*
|
|
287
|
+
* @returns {Array<string>} Array with the words of provided string.
|
|
288
|
+
*/
|
|
289
|
+
static words(x: string): Array<string>;
|
|
290
|
+
/**
|
|
291
|
+
* Checks if reflect metadata is supported.
|
|
292
|
+
*
|
|
293
|
+
* @returns {boolean} True when supported. False otherwise.
|
|
294
|
+
*/
|
|
295
|
+
static isReflectMetadataSupported(): boolean;
|
|
296
|
+
/**
|
|
297
|
+
* Extracts reflect metadata.
|
|
298
|
+
*
|
|
299
|
+
* @param {string} metadataKey Unique metadata key.
|
|
300
|
+
* @param {any} target Target to extract from.
|
|
301
|
+
* @param {string|symbol} targetKey Key in a target.
|
|
302
|
+
*
|
|
303
|
+
* @returns {any} Metadata for a key or undefined if metadata is not present.
|
|
304
|
+
*/
|
|
305
|
+
static extractReflectMetadata(metadataKey: string, target: any, targetKey?: string | symbol): any;
|
|
306
|
+
/**
|
|
307
|
+
* Extracts own reflect metadata.
|
|
308
|
+
*
|
|
309
|
+
* @param {string} metadataKey Unique metadata key.
|
|
310
|
+
* @param {any} target Target to extract from.
|
|
311
|
+
* @param {string|symbol} targetKey Key in a target.
|
|
312
|
+
*
|
|
313
|
+
* @returns {any} Metadata for a key or undefined if metadata is not present.
|
|
314
|
+
*/
|
|
315
|
+
static extractOwnReflectMetadata(metadataKey: string, target: any, targetKey?: string | symbol): any;
|
|
316
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TypeArgument } from './type-argument';
|
|
2
|
-
/**
|
|
3
|
-
* Generic argument represents a data which can be passed to define a generic type.
|
|
4
|
-
*
|
|
5
|
-
* @type {GenericArgument<TType>}
|
|
6
|
-
*/
|
|
7
|
-
export declare type GenericArgument<TType> = TypeArgument<TType> | [TypeArgument<TType>, Array<GenericArgument<any>>];
|
|
1
|
+
import { TypeArgument } from './type-argument';
|
|
2
|
+
/**
|
|
3
|
+
* Generic argument represents a data which can be passed to define a generic type.
|
|
4
|
+
*
|
|
5
|
+
* @type {GenericArgument<TType>}
|
|
6
|
+
*/
|
|
7
|
+
export declare type GenericArgument<TType> = TypeArgument<TType> | [TypeArgument<TType>, Array<GenericArgument<any>>];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TypeMetadata } from './type-metadata';
|
|
2
|
-
/**
|
|
3
|
-
* Generic metadata used to describe a generic type.
|
|
4
|
-
*
|
|
5
|
-
* @type {GenericMetadata<TType>}
|
|
6
|
-
*/
|
|
7
|
-
export declare type GenericMetadata<TType> = [TypeMetadata<TType>, Array<GenericMetadata<any>>];
|
|
1
|
+
import { TypeMetadata } from './type-metadata';
|
|
2
|
+
/**
|
|
3
|
+
* Generic metadata used to describe a generic type.
|
|
4
|
+
*
|
|
5
|
+
* @type {GenericMetadata<TType>}
|
|
6
|
+
*/
|
|
7
|
+
export declare type GenericMetadata<TType> = [TypeMetadata<TType>, Array<GenericMetadata<any>>];
|