@twin.org/core 0.0.3-next.22 → 0.0.3-next.23
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/README.md +1 -9
- package/dist/es/encoding/base32.js +1 -1
- package/dist/es/encoding/base32.js.map +1 -1
- package/dist/es/helpers/arrayHelper.js.map +1 -1
- package/dist/es/index.js +2 -1
- package/dist/es/index.js.map +1 -1
- package/dist/es/types/objectOrArray.js.map +1 -0
- package/dist/es/types/singleOccurrenceArray.js +2 -0
- package/dist/es/types/singleOccurrenceArray.js.map +1 -0
- package/dist/es/utils/guards.js.map +1 -1
- package/dist/types/encoding/base32.d.ts +1 -1
- package/dist/types/helpers/arrayHelper.d.ts +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/types/singleOccurrenceArray.d.ts +9 -0
- package/dist/types/utils/guards.d.ts +1 -1
- package/docs/changelog.md +19 -1
- package/docs/examples.md +308 -1
- package/docs/reference/classes/AlreadyExistsError.md +18 -18
- package/docs/reference/classes/ArrayHelper.md +2 -2
- package/docs/reference/classes/AsyncCache.md +6 -6
- package/docs/reference/classes/Base32.md +4 -4
- package/docs/reference/classes/Base58.md +3 -3
- package/docs/reference/classes/Base64.md +4 -4
- package/docs/reference/classes/Base64Url.md +3 -3
- package/docs/reference/classes/BaseError.md +17 -17
- package/docs/reference/classes/BitString.md +6 -6
- package/docs/reference/classes/Coerce.md +11 -11
- package/docs/reference/classes/Compression.md +3 -3
- package/docs/reference/classes/ConflictError.md +18 -18
- package/docs/reference/classes/Converter.md +18 -18
- package/docs/reference/classes/EnvHelper.md +1 -1
- package/docs/reference/classes/ErrorHelper.md +3 -3
- package/docs/reference/classes/Factory.md +20 -20
- package/docs/reference/classes/FilenameHelper.md +1 -1
- package/docs/reference/classes/GeneralError.md +18 -18
- package/docs/reference/classes/GuardError.md +18 -18
- package/docs/reference/classes/Guards.md +31 -31
- package/docs/reference/classes/HexHelper.md +6 -6
- package/docs/reference/classes/I18n.md +14 -14
- package/docs/reference/classes/Is.md +40 -40
- package/docs/reference/classes/JsonHelper.md +8 -8
- package/docs/reference/classes/NotFoundError.md +18 -18
- package/docs/reference/classes/NotImplementedError.md +18 -18
- package/docs/reference/classes/NotSupportedError.md +18 -18
- package/docs/reference/classes/NumberHelper.md +2 -2
- package/docs/reference/classes/ObjectHelper.md +20 -20
- package/docs/reference/classes/RandomHelper.md +6 -6
- package/docs/reference/classes/SharedStore.md +3 -3
- package/docs/reference/classes/StringHelper.md +23 -23
- package/docs/reference/classes/Uint8ArrayHelper.md +1 -1
- package/docs/reference/classes/UnauthorizedError.md +18 -18
- package/docs/reference/classes/UnprocessableError.md +18 -18
- package/docs/reference/classes/Url.md +8 -8
- package/docs/reference/classes/Urn.md +22 -22
- package/docs/reference/classes/Validation.md +25 -25
- package/docs/reference/classes/ValidationError.md +18 -18
- package/docs/reference/index.md +2 -0
- package/docs/reference/interfaces/IComponent.md +4 -4
- package/docs/reference/interfaces/IError.md +6 -6
- package/docs/reference/interfaces/II18nShared.md +4 -4
- package/docs/reference/interfaces/IKeyValue.md +2 -2
- package/docs/reference/interfaces/ILabelledValue.md +2 -2
- package/docs/reference/interfaces/ILocale.md +2 -2
- package/docs/reference/interfaces/ILocalesIndex.md +1 -1
- package/docs/reference/interfaces/IPatchOperation.md +4 -4
- package/docs/reference/interfaces/IUrlParts.md +6 -6
- package/docs/reference/interfaces/IValidationFailure.md +3 -3
- package/docs/reference/type-aliases/SingleOccurrenceArray.md +15 -0
- package/docs/reference/type-aliases/SingleOccurrenceArrayDepthHelper.md +19 -0
- package/docs/reference/variables/CoerceType.md +10 -10
- package/docs/reference/variables/CompressionType.md +2 -2
- package/package.json +4 -4
- package/dist/es/models/objectOrArray.js.map +0 -1
- /package/dist/es/{models → types}/objectOrArray.js +0 -0
- /package/dist/types/{models → types}/objectOrArray.d.ts +0 -0
|
@@ -60,7 +60,7 @@ The cause or the error if we have wrapped another error.
|
|
|
60
60
|
|
|
61
61
|
## Properties
|
|
62
62
|
|
|
63
|
-
### source?
|
|
63
|
+
### source? {#source}
|
|
64
64
|
|
|
65
65
|
> `optional` **source**: `string`
|
|
66
66
|
|
|
@@ -72,7 +72,7 @@ The source of the error.
|
|
|
72
72
|
|
|
73
73
|
***
|
|
74
74
|
|
|
75
|
-
### properties?
|
|
75
|
+
### properties? {#properties}
|
|
76
76
|
|
|
77
77
|
> `optional` **properties**: `object`
|
|
78
78
|
|
|
@@ -88,7 +88,7 @@ Any additional information for the error.
|
|
|
88
88
|
|
|
89
89
|
***
|
|
90
90
|
|
|
91
|
-
### cause?
|
|
91
|
+
### cause? {#cause}
|
|
92
92
|
|
|
93
93
|
> `optional` **cause**: [`IError`](../interfaces/IError.md)
|
|
94
94
|
|
|
@@ -100,7 +100,7 @@ The cause of the error.
|
|
|
100
100
|
|
|
101
101
|
***
|
|
102
102
|
|
|
103
|
-
### CLASS\_NAME
|
|
103
|
+
### CLASS\_NAME {#class_name}
|
|
104
104
|
|
|
105
105
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
106
106
|
|
|
@@ -108,7 +108,7 @@ Runtime name for the class.
|
|
|
108
108
|
|
|
109
109
|
## Methods
|
|
110
110
|
|
|
111
|
-
### fromError()
|
|
111
|
+
### fromError() {#fromerror}
|
|
112
112
|
|
|
113
113
|
> `static` **fromError**(`err`): [`BaseError`](BaseError.md)
|
|
114
114
|
|
|
@@ -134,7 +134,7 @@ The new instance.
|
|
|
134
134
|
|
|
135
135
|
***
|
|
136
136
|
|
|
137
|
-
### flatten()
|
|
137
|
+
### flatten() {#flatten}
|
|
138
138
|
|
|
139
139
|
> `static` **flatten**(`err`): [`IError`](../interfaces/IError.md)[]
|
|
140
140
|
|
|
@@ -160,7 +160,7 @@ The list of all internal errors.
|
|
|
160
160
|
|
|
161
161
|
***
|
|
162
162
|
|
|
163
|
-
### expand()
|
|
163
|
+
### expand() {#expand}
|
|
164
164
|
|
|
165
165
|
> `static` **expand**(`errors`): [`IError`](../interfaces/IError.md) \| `undefined`
|
|
166
166
|
|
|
@@ -186,7 +186,7 @@ The first level error.
|
|
|
186
186
|
|
|
187
187
|
***
|
|
188
188
|
|
|
189
|
-
### isErrorName()
|
|
189
|
+
### isErrorName() {#iserrorname}
|
|
190
190
|
|
|
191
191
|
> `static` **isErrorName**(`error`, `name`): `error is BaseError`
|
|
192
192
|
|
|
@@ -218,7 +218,7 @@ True if the error has the name.
|
|
|
218
218
|
|
|
219
219
|
***
|
|
220
220
|
|
|
221
|
-
### isErrorMessage()
|
|
221
|
+
### isErrorMessage() {#iserrormessage}
|
|
222
222
|
|
|
223
223
|
> `static` **isErrorMessage**(`error`, `message`): `error is BaseError`
|
|
224
224
|
|
|
@@ -250,7 +250,7 @@ True if the error has the name.
|
|
|
250
250
|
|
|
251
251
|
***
|
|
252
252
|
|
|
253
|
-
### isErrorCode()
|
|
253
|
+
### isErrorCode() {#iserrorcode}
|
|
254
254
|
|
|
255
255
|
> `static` **isErrorCode**(`error`, `code`): `boolean`
|
|
256
256
|
|
|
@@ -282,7 +282,7 @@ True if the error has the code.
|
|
|
282
282
|
|
|
283
283
|
***
|
|
284
284
|
|
|
285
|
-
### someErrorName()
|
|
285
|
+
### someErrorName() {#someerrorname}
|
|
286
286
|
|
|
287
287
|
> `static` **someErrorName**(`error`, `name`): `error is BaseError`
|
|
288
288
|
|
|
@@ -314,7 +314,7 @@ True if the error has the name.
|
|
|
314
314
|
|
|
315
315
|
***
|
|
316
316
|
|
|
317
|
-
### someErrorMessage()
|
|
317
|
+
### someErrorMessage() {#someerrormessage}
|
|
318
318
|
|
|
319
319
|
> `static` **someErrorMessage**(`error`, `message`): `error is BaseError`
|
|
320
320
|
|
|
@@ -346,7 +346,7 @@ True if the error has the name.
|
|
|
346
346
|
|
|
347
347
|
***
|
|
348
348
|
|
|
349
|
-
### someErrorClass()
|
|
349
|
+
### someErrorClass() {#someerrorclass}
|
|
350
350
|
|
|
351
351
|
> `static` **someErrorClass**(`error`, `cls`): `error is BaseError`
|
|
352
352
|
|
|
@@ -378,7 +378,7 @@ True if the error has the specific class.
|
|
|
378
378
|
|
|
379
379
|
***
|
|
380
380
|
|
|
381
|
-
### someErrorCode()
|
|
381
|
+
### someErrorCode() {#someerrorcode}
|
|
382
382
|
|
|
383
383
|
> `static` **someErrorCode**(`error`, `code`): `error is BaseError`
|
|
384
384
|
|
|
@@ -410,7 +410,7 @@ True if the error has the name.
|
|
|
410
410
|
|
|
411
411
|
***
|
|
412
412
|
|
|
413
|
-
### isEmpty()
|
|
413
|
+
### isEmpty() {#isempty}
|
|
414
414
|
|
|
415
415
|
> `static` **isEmpty**(`err`): `boolean`
|
|
416
416
|
|
|
@@ -436,7 +436,7 @@ True if the error is empty.
|
|
|
436
436
|
|
|
437
437
|
***
|
|
438
438
|
|
|
439
|
-
### isAggregateError()
|
|
439
|
+
### isAggregateError() {#isaggregateerror}
|
|
440
440
|
|
|
441
441
|
> `static` **isAggregateError**(`err`): `err is AggregateError`
|
|
442
442
|
|
|
@@ -462,7 +462,7 @@ True if the error is an aggregate error.
|
|
|
462
462
|
|
|
463
463
|
***
|
|
464
464
|
|
|
465
|
-
### fromAggregate()
|
|
465
|
+
### fromAggregate() {#fromaggregate}
|
|
466
466
|
|
|
467
467
|
> `static` **fromAggregate**(`err`, `includeStackTrace?`): [`IError`](../interfaces/IError.md)[]
|
|
468
468
|
|
|
@@ -494,7 +494,7 @@ The array of errors.
|
|
|
494
494
|
|
|
495
495
|
***
|
|
496
496
|
|
|
497
|
-
### toJsonObject()
|
|
497
|
+
### toJsonObject() {#tojsonobject}
|
|
498
498
|
|
|
499
499
|
> **toJsonObject**(`includeStackTrace?`): [`IError`](../interfaces/IError.md)
|
|
500
500
|
|
|
@@ -14,7 +14,7 @@ Convert arrays to and from different formats.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
### bytesToUtf8()
|
|
17
|
+
### bytesToUtf8() {#bytestoutf8}
|
|
18
18
|
|
|
19
19
|
> `static` **bytesToUtf8**(`array`, `startIndex?`, `length?`): `string`
|
|
20
20
|
|
|
@@ -48,7 +48,7 @@ The array formatted as UTF8.
|
|
|
48
48
|
|
|
49
49
|
***
|
|
50
50
|
|
|
51
|
-
### utf8ToBytes()
|
|
51
|
+
### utf8ToBytes() {#utf8tobytes}
|
|
52
52
|
|
|
53
53
|
> `static` **utf8ToBytes**(`utf8`): `Uint8Array`
|
|
54
54
|
|
|
@@ -70,9 +70,9 @@ The array.
|
|
|
70
70
|
|
|
71
71
|
***
|
|
72
72
|
|
|
73
|
-
### bytesToHex()
|
|
73
|
+
### bytesToHex() {#bytestohex}
|
|
74
74
|
|
|
75
|
-
> `static` **bytesToHex**(`array`, `includePrefix
|
|
75
|
+
> `static` **bytesToHex**(`array`, `includePrefix?`, `startIndex?`, `length?`, `reverse?`): `string`
|
|
76
76
|
|
|
77
77
|
Encode a raw array to hex string.
|
|
78
78
|
|
|
@@ -84,7 +84,7 @@ Encode a raw array to hex string.
|
|
|
84
84
|
|
|
85
85
|
The bytes to encode.
|
|
86
86
|
|
|
87
|
-
##### includePrefix
|
|
87
|
+
##### includePrefix?
|
|
88
88
|
|
|
89
89
|
`boolean` = `false`
|
|
90
90
|
|
|
@@ -116,7 +116,7 @@ The array formatted as hex.
|
|
|
116
116
|
|
|
117
117
|
***
|
|
118
118
|
|
|
119
|
-
### hexToBytes()
|
|
119
|
+
### hexToBytes() {#hextobytes}
|
|
120
120
|
|
|
121
121
|
> `static` **hexToBytes**(`hex`, `reverse?`): `Uint8Array`
|
|
122
122
|
|
|
@@ -144,9 +144,9 @@ The array.
|
|
|
144
144
|
|
|
145
145
|
***
|
|
146
146
|
|
|
147
|
-
### utf8ToHex()
|
|
147
|
+
### utf8ToHex() {#utf8tohex}
|
|
148
148
|
|
|
149
|
-
> `static` **utf8ToHex**(`utf8`, `includePrefix
|
|
149
|
+
> `static` **utf8ToHex**(`utf8`, `includePrefix?`): `string`
|
|
150
150
|
|
|
151
151
|
Convert the UTF8 to hex.
|
|
152
152
|
|
|
@@ -158,7 +158,7 @@ Convert the UTF8 to hex.
|
|
|
158
158
|
|
|
159
159
|
The text to convert.
|
|
160
160
|
|
|
161
|
-
##### includePrefix
|
|
161
|
+
##### includePrefix?
|
|
162
162
|
|
|
163
163
|
`boolean` = `false`
|
|
164
164
|
|
|
@@ -172,7 +172,7 @@ The hex version of the bytes.
|
|
|
172
172
|
|
|
173
173
|
***
|
|
174
174
|
|
|
175
|
-
### hexToUtf8()
|
|
175
|
+
### hexToUtf8() {#hextoutf8}
|
|
176
176
|
|
|
177
177
|
> `static` **hexToUtf8**(`hex`): `string`
|
|
178
178
|
|
|
@@ -194,7 +194,7 @@ The UTF8 version of the bytes.
|
|
|
194
194
|
|
|
195
195
|
***
|
|
196
196
|
|
|
197
|
-
### bytesToBinary()
|
|
197
|
+
### bytesToBinary() {#bytestobinary}
|
|
198
198
|
|
|
199
199
|
> `static` **bytesToBinary**(`bytes`): `string`
|
|
200
200
|
|
|
@@ -216,7 +216,7 @@ A binary string of the bytes.
|
|
|
216
216
|
|
|
217
217
|
***
|
|
218
218
|
|
|
219
|
-
### binaryToBytes()
|
|
219
|
+
### binaryToBytes() {#binarytobytes}
|
|
220
220
|
|
|
221
221
|
> `static` **binaryToBytes**(`binary`): `Uint8Array`
|
|
222
222
|
|
|
@@ -238,7 +238,7 @@ The bytes.
|
|
|
238
238
|
|
|
239
239
|
***
|
|
240
240
|
|
|
241
|
-
### bytesToBase64()
|
|
241
|
+
### bytesToBase64() {#bytestobase64}
|
|
242
242
|
|
|
243
243
|
> `static` **bytesToBase64**(`bytes`): `string`
|
|
244
244
|
|
|
@@ -260,7 +260,7 @@ A base64 string of the bytes.
|
|
|
260
260
|
|
|
261
261
|
***
|
|
262
262
|
|
|
263
|
-
### base64ToBytes()
|
|
263
|
+
### base64ToBytes() {#base64tobytes}
|
|
264
264
|
|
|
265
265
|
> `static` **base64ToBytes**(`base64`): `Uint8Array`
|
|
266
266
|
|
|
@@ -282,7 +282,7 @@ The bytes.
|
|
|
282
282
|
|
|
283
283
|
***
|
|
284
284
|
|
|
285
|
-
### bytesToBase64Url()
|
|
285
|
+
### bytesToBase64Url() {#bytestobase64url}
|
|
286
286
|
|
|
287
287
|
> `static` **bytesToBase64Url**(`bytes`): `string`
|
|
288
288
|
|
|
@@ -304,7 +304,7 @@ A base64 url string of the bytes.
|
|
|
304
304
|
|
|
305
305
|
***
|
|
306
306
|
|
|
307
|
-
### base64UrlToBytes()
|
|
307
|
+
### base64UrlToBytes() {#base64urltobytes}
|
|
308
308
|
|
|
309
309
|
> `static` **base64UrlToBytes**(`base64Url`): `Uint8Array`
|
|
310
310
|
|
|
@@ -326,7 +326,7 @@ The bytes.
|
|
|
326
326
|
|
|
327
327
|
***
|
|
328
328
|
|
|
329
|
-
### bytesToBase58()
|
|
329
|
+
### bytesToBase58() {#bytestobase58}
|
|
330
330
|
|
|
331
331
|
> `static` **bytesToBase58**(`bytes`): `string`
|
|
332
332
|
|
|
@@ -348,7 +348,7 @@ A base58 string of the bytes.
|
|
|
348
348
|
|
|
349
349
|
***
|
|
350
350
|
|
|
351
|
-
### base58ToBytes()
|
|
351
|
+
### base58ToBytes() {#base58tobytes}
|
|
352
352
|
|
|
353
353
|
> `static` **base58ToBytes**(`base58`): `Uint8Array`
|
|
354
354
|
|
|
@@ -14,7 +14,7 @@ Error helper functions.
|
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
### formatErrors()
|
|
17
|
+
### formatErrors() {#formaterrors}
|
|
18
18
|
|
|
19
19
|
> `static` **formatErrors**(`error`, `includeDetails?`): `string`[]
|
|
20
20
|
|
|
@@ -42,7 +42,7 @@ The error formatted including any causes errors.
|
|
|
42
42
|
|
|
43
43
|
***
|
|
44
44
|
|
|
45
|
-
### localizeErrors()
|
|
45
|
+
### localizeErrors() {#localizeerrors}
|
|
46
46
|
|
|
47
47
|
> `static` **localizeErrors**(`error`): [`IError`](../interfaces/IError.md)[]
|
|
48
48
|
|
|
@@ -64,7 +64,7 @@ The localized version of the errors flattened.
|
|
|
64
64
|
|
|
65
65
|
***
|
|
66
66
|
|
|
67
|
-
### formatValidationErrors()
|
|
67
|
+
### formatValidationErrors() {#formatvalidationerrors}
|
|
68
68
|
|
|
69
69
|
> `static` **formatValidationErrors**(`error`): `string` \| `undefined`
|
|
70
70
|
|
|
@@ -10,7 +10,7 @@ Factory for creating implementation of generic types.
|
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
13
|
-
### CLASS\_NAME
|
|
13
|
+
### CLASS\_NAME {#class_name}
|
|
14
14
|
|
|
15
15
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
16
16
|
|
|
@@ -18,9 +18,9 @@ Runtime name for the class.
|
|
|
18
18
|
|
|
19
19
|
## Methods
|
|
20
20
|
|
|
21
|
-
### createFactory()
|
|
21
|
+
### createFactory() {#createfactory}
|
|
22
22
|
|
|
23
|
-
> `static` **createFactory**\<`U`\>(`typeName`, `autoInstance
|
|
23
|
+
> `static` **createFactory**\<`U`\>(`typeName`, `autoInstance?`, `matcher?`): `Factory`\<`U`\>
|
|
24
24
|
|
|
25
25
|
Create a new factory, which is shared throughout all library instances.
|
|
26
26
|
|
|
@@ -38,7 +38,7 @@ Create a new factory, which is shared throughout all library instances.
|
|
|
38
38
|
|
|
39
39
|
The type name for the instances.
|
|
40
40
|
|
|
41
|
-
##### autoInstance
|
|
41
|
+
##### autoInstance?
|
|
42
42
|
|
|
43
43
|
`boolean` = `false`
|
|
44
44
|
|
|
@@ -58,7 +58,7 @@ The factory instance.
|
|
|
58
58
|
|
|
59
59
|
***
|
|
60
60
|
|
|
61
|
-
### getFactories()
|
|
61
|
+
### getFactories() {#getfactories}
|
|
62
62
|
|
|
63
63
|
> `static` **getFactories**(): `object`
|
|
64
64
|
|
|
@@ -72,7 +72,7 @@ All the factories.
|
|
|
72
72
|
|
|
73
73
|
***
|
|
74
74
|
|
|
75
|
-
### resetFactories()
|
|
75
|
+
### resetFactories() {#resetfactories}
|
|
76
76
|
|
|
77
77
|
> `static` **resetFactories**(): `void`
|
|
78
78
|
|
|
@@ -84,7 +84,7 @@ Reset all the factories, which removes any created instances, but not the regist
|
|
|
84
84
|
|
|
85
85
|
***
|
|
86
86
|
|
|
87
|
-
### clearFactories()
|
|
87
|
+
### clearFactories() {#clearfactories}
|
|
88
88
|
|
|
89
89
|
> `static` **clearFactories**(): `void`
|
|
90
90
|
|
|
@@ -96,7 +96,7 @@ Clear all the factories, which removes anything registered with the factories.
|
|
|
96
96
|
|
|
97
97
|
***
|
|
98
98
|
|
|
99
|
-
### typeName()
|
|
99
|
+
### typeName() {#typename}
|
|
100
100
|
|
|
101
101
|
> **typeName**(): `string`
|
|
102
102
|
|
|
@@ -110,7 +110,7 @@ The type name of the factory.
|
|
|
110
110
|
|
|
111
111
|
***
|
|
112
112
|
|
|
113
|
-
### register()
|
|
113
|
+
### register() {#register}
|
|
114
114
|
|
|
115
115
|
> **register**\<`U`\>(`name`, `generator`): `void`
|
|
116
116
|
|
|
@@ -142,7 +142,7 @@ The function to create an instance.
|
|
|
142
142
|
|
|
143
143
|
***
|
|
144
144
|
|
|
145
|
-
### unregister()
|
|
145
|
+
### unregister() {#unregister}
|
|
146
146
|
|
|
147
147
|
> **unregister**(`name`): `void`
|
|
148
148
|
|
|
@@ -170,7 +170,7 @@ GeneralError if no generator exists.
|
|
|
170
170
|
|
|
171
171
|
***
|
|
172
172
|
|
|
173
|
-
### get()
|
|
173
|
+
### get() {#get}
|
|
174
174
|
|
|
175
175
|
> **get**\<`U`\>(`name`): `U`
|
|
176
176
|
|
|
@@ -206,7 +206,7 @@ GeneralError if no item exists to get.
|
|
|
206
206
|
|
|
207
207
|
***
|
|
208
208
|
|
|
209
|
-
### getIfExists()
|
|
209
|
+
### getIfExists() {#getifexists}
|
|
210
210
|
|
|
211
211
|
> **getIfExists**\<`U`\>(`name?`): `U` \| `undefined`
|
|
212
212
|
|
|
@@ -234,7 +234,7 @@ An instance of the item or undefined if it does not exist.
|
|
|
234
234
|
|
|
235
235
|
***
|
|
236
236
|
|
|
237
|
-
### create()
|
|
237
|
+
### create() {#create}
|
|
238
238
|
|
|
239
239
|
> **create**\<`U`\>(`name`, `args?`): `U`
|
|
240
240
|
|
|
@@ -276,7 +276,7 @@ GeneralError if no item exists to create.
|
|
|
276
276
|
|
|
277
277
|
***
|
|
278
278
|
|
|
279
|
-
### createIfExists()
|
|
279
|
+
### createIfExists() {#createifexists}
|
|
280
280
|
|
|
281
281
|
> **createIfExists**\<`U`\>(`name`, `args?`): `U` \| `undefined`
|
|
282
282
|
|
|
@@ -314,7 +314,7 @@ GuardError if the parameters are invalid.
|
|
|
314
314
|
|
|
315
315
|
***
|
|
316
316
|
|
|
317
|
-
### reset()
|
|
317
|
+
### reset() {#reset}
|
|
318
318
|
|
|
319
319
|
> **reset**(): `void`
|
|
320
320
|
|
|
@@ -326,7 +326,7 @@ Remove all the instances and leave the generators intact.
|
|
|
326
326
|
|
|
327
327
|
***
|
|
328
328
|
|
|
329
|
-
### clear()
|
|
329
|
+
### clear() {#clear}
|
|
330
330
|
|
|
331
331
|
> **clear**(): `void`
|
|
332
332
|
|
|
@@ -338,7 +338,7 @@ Remove all the instances and the generators.
|
|
|
338
338
|
|
|
339
339
|
***
|
|
340
340
|
|
|
341
|
-
### instancesMap()
|
|
341
|
+
### instancesMap() {#instancesmap}
|
|
342
342
|
|
|
343
343
|
> **instancesMap**(): `object`
|
|
344
344
|
|
|
@@ -352,7 +352,7 @@ The instances as a map.
|
|
|
352
352
|
|
|
353
353
|
***
|
|
354
354
|
|
|
355
|
-
### instancesList()
|
|
355
|
+
### instancesList() {#instanceslist}
|
|
356
356
|
|
|
357
357
|
> **instancesList**(): `T`[]
|
|
358
358
|
|
|
@@ -366,7 +366,7 @@ The instances as a list in the order they were registered.
|
|
|
366
366
|
|
|
367
367
|
***
|
|
368
368
|
|
|
369
|
-
### names()
|
|
369
|
+
### names() {#names}
|
|
370
370
|
|
|
371
371
|
> **names**(): `string`[]
|
|
372
372
|
|
|
@@ -380,7 +380,7 @@ The ordered generator names.
|
|
|
380
380
|
|
|
381
381
|
***
|
|
382
382
|
|
|
383
|
-
### hasName()
|
|
383
|
+
### hasName() {#hasname}
|
|
384
384
|
|
|
385
385
|
> **hasName**(`name`): `boolean`
|
|
386
386
|
|
|
@@ -48,7 +48,7 @@ The cause of the error if we have wrapped another error.
|
|
|
48
48
|
|
|
49
49
|
## Properties
|
|
50
50
|
|
|
51
|
-
### source?
|
|
51
|
+
### source? {#source}
|
|
52
52
|
|
|
53
53
|
> `optional` **source**: `string`
|
|
54
54
|
|
|
@@ -60,7 +60,7 @@ The source of the error.
|
|
|
60
60
|
|
|
61
61
|
***
|
|
62
62
|
|
|
63
|
-
### properties?
|
|
63
|
+
### properties? {#properties}
|
|
64
64
|
|
|
65
65
|
> `optional` **properties**: `object`
|
|
66
66
|
|
|
@@ -76,7 +76,7 @@ Any additional information for the error.
|
|
|
76
76
|
|
|
77
77
|
***
|
|
78
78
|
|
|
79
|
-
### cause?
|
|
79
|
+
### cause? {#cause}
|
|
80
80
|
|
|
81
81
|
> `optional` **cause**: [`IError`](../interfaces/IError.md)
|
|
82
82
|
|
|
@@ -88,7 +88,7 @@ The cause of the error.
|
|
|
88
88
|
|
|
89
89
|
***
|
|
90
90
|
|
|
91
|
-
### CLASS\_NAME
|
|
91
|
+
### CLASS\_NAME {#class_name}
|
|
92
92
|
|
|
93
93
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
94
94
|
|
|
@@ -96,7 +96,7 @@ Runtime name for the class.
|
|
|
96
96
|
|
|
97
97
|
## Methods
|
|
98
98
|
|
|
99
|
-
### fromError()
|
|
99
|
+
### fromError() {#fromerror}
|
|
100
100
|
|
|
101
101
|
> `static` **fromError**(`err`): [`BaseError`](BaseError.md)
|
|
102
102
|
|
|
@@ -122,7 +122,7 @@ The new instance.
|
|
|
122
122
|
|
|
123
123
|
***
|
|
124
124
|
|
|
125
|
-
### flatten()
|
|
125
|
+
### flatten() {#flatten}
|
|
126
126
|
|
|
127
127
|
> `static` **flatten**(`err`): [`IError`](../interfaces/IError.md)[]
|
|
128
128
|
|
|
@@ -148,7 +148,7 @@ The list of all internal errors.
|
|
|
148
148
|
|
|
149
149
|
***
|
|
150
150
|
|
|
151
|
-
### expand()
|
|
151
|
+
### expand() {#expand}
|
|
152
152
|
|
|
153
153
|
> `static` **expand**(`errors`): [`IError`](../interfaces/IError.md) \| `undefined`
|
|
154
154
|
|
|
@@ -174,7 +174,7 @@ The first level error.
|
|
|
174
174
|
|
|
175
175
|
***
|
|
176
176
|
|
|
177
|
-
### isErrorName()
|
|
177
|
+
### isErrorName() {#iserrorname}
|
|
178
178
|
|
|
179
179
|
> `static` **isErrorName**(`error`, `name`): `error is BaseError`
|
|
180
180
|
|
|
@@ -206,7 +206,7 @@ True if the error has the name.
|
|
|
206
206
|
|
|
207
207
|
***
|
|
208
208
|
|
|
209
|
-
### isErrorMessage()
|
|
209
|
+
### isErrorMessage() {#iserrormessage}
|
|
210
210
|
|
|
211
211
|
> `static` **isErrorMessage**(`error`, `message`): `error is BaseError`
|
|
212
212
|
|
|
@@ -238,7 +238,7 @@ True if the error has the name.
|
|
|
238
238
|
|
|
239
239
|
***
|
|
240
240
|
|
|
241
|
-
### isErrorCode()
|
|
241
|
+
### isErrorCode() {#iserrorcode}
|
|
242
242
|
|
|
243
243
|
> `static` **isErrorCode**(`error`, `code`): `boolean`
|
|
244
244
|
|
|
@@ -270,7 +270,7 @@ True if the error has the code.
|
|
|
270
270
|
|
|
271
271
|
***
|
|
272
272
|
|
|
273
|
-
### someErrorName()
|
|
273
|
+
### someErrorName() {#someerrorname}
|
|
274
274
|
|
|
275
275
|
> `static` **someErrorName**(`error`, `name`): `error is BaseError`
|
|
276
276
|
|
|
@@ -302,7 +302,7 @@ True if the error has the name.
|
|
|
302
302
|
|
|
303
303
|
***
|
|
304
304
|
|
|
305
|
-
### someErrorMessage()
|
|
305
|
+
### someErrorMessage() {#someerrormessage}
|
|
306
306
|
|
|
307
307
|
> `static` **someErrorMessage**(`error`, `message`): `error is BaseError`
|
|
308
308
|
|
|
@@ -334,7 +334,7 @@ True if the error has the name.
|
|
|
334
334
|
|
|
335
335
|
***
|
|
336
336
|
|
|
337
|
-
### someErrorClass()
|
|
337
|
+
### someErrorClass() {#someerrorclass}
|
|
338
338
|
|
|
339
339
|
> `static` **someErrorClass**(`error`, `cls`): `error is BaseError`
|
|
340
340
|
|
|
@@ -366,7 +366,7 @@ True if the error has the specific class.
|
|
|
366
366
|
|
|
367
367
|
***
|
|
368
368
|
|
|
369
|
-
### someErrorCode()
|
|
369
|
+
### someErrorCode() {#someerrorcode}
|
|
370
370
|
|
|
371
371
|
> `static` **someErrorCode**(`error`, `code`): `error is BaseError`
|
|
372
372
|
|
|
@@ -398,7 +398,7 @@ True if the error has the name.
|
|
|
398
398
|
|
|
399
399
|
***
|
|
400
400
|
|
|
401
|
-
### isEmpty()
|
|
401
|
+
### isEmpty() {#isempty}
|
|
402
402
|
|
|
403
403
|
> `static` **isEmpty**(`err`): `boolean`
|
|
404
404
|
|
|
@@ -424,7 +424,7 @@ True if the error is empty.
|
|
|
424
424
|
|
|
425
425
|
***
|
|
426
426
|
|
|
427
|
-
### isAggregateError()
|
|
427
|
+
### isAggregateError() {#isaggregateerror}
|
|
428
428
|
|
|
429
429
|
> `static` **isAggregateError**(`err`): `err is AggregateError`
|
|
430
430
|
|
|
@@ -450,7 +450,7 @@ True if the error is an aggregate error.
|
|
|
450
450
|
|
|
451
451
|
***
|
|
452
452
|
|
|
453
|
-
### fromAggregate()
|
|
453
|
+
### fromAggregate() {#fromaggregate}
|
|
454
454
|
|
|
455
455
|
> `static` **fromAggregate**(`err`, `includeStackTrace?`): [`IError`](../interfaces/IError.md)[]
|
|
456
456
|
|
|
@@ -482,7 +482,7 @@ The array of errors.
|
|
|
482
482
|
|
|
483
483
|
***
|
|
484
484
|
|
|
485
|
-
### toJsonObject()
|
|
485
|
+
### toJsonObject() {#tojsonobject}
|
|
486
486
|
|
|
487
487
|
> **toJsonObject**(`includeStackTrace?`): [`IError`](../interfaces/IError.md)
|
|
488
488
|
|