@twin.org/core 0.0.1-next.51 → 0.0.1-next.53
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/cjs/index.cjs +225 -75
- package/dist/esm/index.mjs +225 -76
- package/dist/types/index.d.ts +2 -0
- package/dist/types/models/II18nShared.d.ts +29 -0
- package/dist/types/utils/asyncCache.d.ts +2 -1
- package/dist/types/utils/sharedStore.d.ts +23 -0
- package/docs/changelog.md +14 -0
- package/docs/reference/classes/AlreadyExistsError.md +7 -7
- package/docs/reference/classes/ArrayHelper.md +3 -3
- package/docs/reference/classes/AsyncCache.md +21 -9
- package/docs/reference/classes/Base32.md +3 -3
- package/docs/reference/classes/Base58.md +3 -3
- package/docs/reference/classes/Base64.md +3 -3
- package/docs/reference/classes/Base64Url.md +3 -3
- package/docs/reference/classes/BaseError.md +5 -5
- package/docs/reference/classes/BitString.md +5 -5
- package/docs/reference/classes/Coerce.md +7 -5
- package/docs/reference/classes/Compression.md +3 -3
- package/docs/reference/classes/ConflictError.md +7 -7
- package/docs/reference/classes/Converter.md +6 -6
- package/docs/reference/classes/EnvHelper.md +7 -5
- package/docs/reference/classes/ErrorHelper.md +3 -3
- package/docs/reference/classes/Factory.md +17 -7
- package/docs/reference/classes/FilenameHelper.md +3 -3
- package/docs/reference/classes/GeneralError.md +7 -7
- package/docs/reference/classes/GuardError.md +7 -7
- package/docs/reference/classes/Guards.md +18 -8
- package/docs/reference/classes/HexHelper.md +3 -3
- package/docs/reference/classes/I18n.md +6 -6
- package/docs/reference/classes/Is.md +21 -9
- package/docs/reference/classes/JsonHelper.md +10 -6
- package/docs/reference/classes/NotFoundError.md +7 -7
- package/docs/reference/classes/NotImplementedError.md +7 -7
- package/docs/reference/classes/NotSupportedError.md +7 -7
- package/docs/reference/classes/ObjectHelper.md +40 -18
- package/docs/reference/classes/RandomHelper.md +3 -3
- package/docs/reference/classes/SharedStore.md +94 -0
- package/docs/reference/classes/StringHelper.md +3 -3
- package/docs/reference/classes/Uint8ArrayHelper.md +3 -3
- package/docs/reference/classes/UnauthorizedError.md +7 -7
- package/docs/reference/classes/UnprocessableError.md +7 -7
- package/docs/reference/classes/Url.md +7 -7
- package/docs/reference/classes/Urn.md +9 -9
- package/docs/reference/classes/Validation.md +36 -28
- package/docs/reference/classes/ValidationError.md +7 -7
- package/docs/reference/index.md +2 -0
- package/docs/reference/interfaces/IComponent.md +3 -3
- package/docs/reference/interfaces/IError.md +1 -1
- package/docs/reference/interfaces/II18nShared.md +47 -0
- package/docs/reference/interfaces/IKeyValue.md +3 -1
- package/docs/reference/interfaces/ILabelledValue.md +3 -1
- package/docs/reference/interfaces/ILocaleDictionary.md +1 -1
- package/docs/reference/type-aliases/CoerceType.md +1 -1
- package/docs/reference/type-aliases/CompressionType.md +1 -1
- package/package.json +2 -2
|
@@ -8,9 +8,9 @@ Class to handle errors when some data can not be processed.
|
|
|
8
8
|
|
|
9
9
|
## Constructors
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Constructor
|
|
12
12
|
|
|
13
|
-
> **new UnprocessableError**(`source`, `message`, `properties
|
|
13
|
+
> **new UnprocessableError**(`source`, `message`, `properties?`, `inner?`): `UnprocessableError`
|
|
14
14
|
|
|
15
15
|
Create a new instance of UnprocessableError.
|
|
16
16
|
|
|
@@ -40,11 +40,11 @@ The inner error if we have wrapped another error.
|
|
|
40
40
|
|
|
41
41
|
#### Returns
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
`UnprocessableError`
|
|
44
44
|
|
|
45
45
|
#### Overrides
|
|
46
46
|
|
|
47
|
-
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#
|
|
47
|
+
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#constructor)
|
|
48
48
|
|
|
49
49
|
## Properties
|
|
50
50
|
|
|
@@ -56,7 +56,7 @@ The source of the error.
|
|
|
56
56
|
|
|
57
57
|
#### Inherited from
|
|
58
58
|
|
|
59
|
-
[`BaseError`](BaseError.md).[`source`](BaseError.md#source
|
|
59
|
+
[`BaseError`](BaseError.md).[`source`](BaseError.md#source)
|
|
60
60
|
|
|
61
61
|
***
|
|
62
62
|
|
|
@@ -72,7 +72,7 @@ Any additional information for the error.
|
|
|
72
72
|
|
|
73
73
|
#### Inherited from
|
|
74
74
|
|
|
75
|
-
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties
|
|
75
|
+
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties)
|
|
76
76
|
|
|
77
77
|
***
|
|
78
78
|
|
|
@@ -84,7 +84,7 @@ The inner error if there was one.
|
|
|
84
84
|
|
|
85
85
|
#### Inherited from
|
|
86
86
|
|
|
87
|
-
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner
|
|
87
|
+
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner)
|
|
88
88
|
|
|
89
89
|
***
|
|
90
90
|
|
|
@@ -4,9 +4,9 @@ Class to help with urls.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Url**(`url`):
|
|
9
|
+
> **new Url**(`url`): `Url`
|
|
10
10
|
|
|
11
11
|
Create a new instance of Url.
|
|
12
12
|
|
|
@@ -20,13 +20,13 @@ The url string.
|
|
|
20
20
|
|
|
21
21
|
#### Returns
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
`Url`
|
|
24
24
|
|
|
25
25
|
## Methods
|
|
26
26
|
|
|
27
27
|
### tryParseExact()
|
|
28
28
|
|
|
29
|
-
> `static` **tryParseExact**(`url`): `undefined` \|
|
|
29
|
+
> `static` **tryParseExact**(`url`): `undefined` \| `Url`
|
|
30
30
|
|
|
31
31
|
Try and parse a string into the url parts.
|
|
32
32
|
|
|
@@ -40,7 +40,7 @@ The url to parse.
|
|
|
40
40
|
|
|
41
41
|
#### Returns
|
|
42
42
|
|
|
43
|
-
`undefined` \|
|
|
43
|
+
`undefined` \| `Url`
|
|
44
44
|
|
|
45
45
|
The formatted url or undefined if the value is not a url.
|
|
46
46
|
|
|
@@ -140,7 +140,7 @@ The formatted url.
|
|
|
140
140
|
|
|
141
141
|
### fromParts()
|
|
142
142
|
|
|
143
|
-
> `static` **fromParts**(`urlParts`):
|
|
143
|
+
> `static` **fromParts**(`urlParts`): `Url`
|
|
144
144
|
|
|
145
145
|
Construct a url from valid parts.
|
|
146
146
|
|
|
@@ -154,7 +154,7 @@ The url to create the parts from.
|
|
|
154
154
|
|
|
155
155
|
#### Returns
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
`Url`
|
|
158
158
|
|
|
159
159
|
The formatted url.
|
|
160
160
|
|
|
@@ -4,9 +4,9 @@ Class to help with urns.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Urn**(`namespaceIdentifier`, `namespaceSpecific`):
|
|
9
|
+
> **new Urn**(`namespaceIdentifier`, `namespaceSpecific`): `Urn`
|
|
10
10
|
|
|
11
11
|
Create a new instance of Urn.
|
|
12
12
|
|
|
@@ -26,13 +26,13 @@ The specific part of the namespace.
|
|
|
26
26
|
|
|
27
27
|
#### Returns
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
`Urn`
|
|
30
30
|
|
|
31
31
|
## Methods
|
|
32
32
|
|
|
33
33
|
### generateRandom()
|
|
34
34
|
|
|
35
|
-
> `static` **generateRandom**(`namespace`):
|
|
35
|
+
> `static` **generateRandom**(`namespace`): `Urn`
|
|
36
36
|
|
|
37
37
|
Generate a random identifier with 32 byte id.
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@ The prefix for the urn.
|
|
|
46
46
|
|
|
47
47
|
#### Returns
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
`Urn`
|
|
50
50
|
|
|
51
51
|
A new Id in URN format.
|
|
52
52
|
|
|
@@ -82,7 +82,7 @@ True if the namespace matches.
|
|
|
82
82
|
|
|
83
83
|
### tryParseExact()
|
|
84
84
|
|
|
85
|
-
> `static` **tryParseExact**(`urn`): `undefined` \|
|
|
85
|
+
> `static` **tryParseExact**(`urn`): `undefined` \| `Urn`
|
|
86
86
|
|
|
87
87
|
Try and parse a string into the urn parts.
|
|
88
88
|
|
|
@@ -96,7 +96,7 @@ The urn to parse.
|
|
|
96
96
|
|
|
97
97
|
#### Returns
|
|
98
98
|
|
|
99
|
-
`undefined` \|
|
|
99
|
+
`undefined` \| `Urn`
|
|
100
100
|
|
|
101
101
|
The formatted urn or undefined if the value is not a urn.
|
|
102
102
|
|
|
@@ -104,7 +104,7 @@ The formatted urn or undefined if the value is not a urn.
|
|
|
104
104
|
|
|
105
105
|
### fromValidString()
|
|
106
106
|
|
|
107
|
-
> `static` **fromValidString**(`urn`):
|
|
107
|
+
> `static` **fromValidString**(`urn`): `Urn`
|
|
108
108
|
|
|
109
109
|
Construct a urn from a string that has already been validated.
|
|
110
110
|
|
|
@@ -118,7 +118,7 @@ The urn to parse.
|
|
|
118
118
|
|
|
119
119
|
#### Returns
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
`Urn`
|
|
122
122
|
|
|
123
123
|
The formatted urn.
|
|
124
124
|
|
|
@@ -4,19 +4,19 @@ Class to handle validation operations.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Validation**():
|
|
9
|
+
> **new Validation**(): `Validation`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`Validation`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
17
|
### empty()
|
|
18
18
|
|
|
19
|
-
> `static` **empty**(`property`, `value`, `failures`, `fieldNameResource
|
|
19
|
+
> `static` **empty**(`property`, `value`, `failures`, `fieldNameResource?`): value is undefined \| null
|
|
20
20
|
|
|
21
21
|
Is the property null or undefined.
|
|
22
22
|
|
|
@@ -56,7 +56,7 @@ True if the value is a empty.
|
|
|
56
56
|
|
|
57
57
|
### notEmpty()
|
|
58
58
|
|
|
59
|
-
> `static` **notEmpty**(`property`, `value`, `failures`, `fieldNameResource
|
|
59
|
+
> `static` **notEmpty**(`property`, `value`, `failures`, `fieldNameResource?`): `boolean`
|
|
60
60
|
|
|
61
61
|
Is the property is not null or undefined.
|
|
62
62
|
|
|
@@ -96,7 +96,7 @@ True if the value is a not empty.
|
|
|
96
96
|
|
|
97
97
|
### string()
|
|
98
98
|
|
|
99
|
-
> `static` **string**(`property`, `value`, `failures`, `fieldNameResource
|
|
99
|
+
> `static` **string**(`property`, `value`, `failures`, `fieldNameResource?`, `options?`): `value is string`
|
|
100
100
|
|
|
101
101
|
Is the property a string.
|
|
102
102
|
|
|
@@ -158,7 +158,7 @@ True if the value is a valid string.
|
|
|
158
158
|
|
|
159
159
|
### stringValue()
|
|
160
160
|
|
|
161
|
-
> `static` **stringValue**(`property`, `value`, `failures`, `fieldNameResource
|
|
161
|
+
> `static` **stringValue**(`property`, `value`, `failures`, `fieldNameResource?`, `options?`): `value is string`
|
|
162
162
|
|
|
163
163
|
Is the property a string with a value.
|
|
164
164
|
|
|
@@ -214,7 +214,7 @@ True if the value is a valid string.
|
|
|
214
214
|
|
|
215
215
|
### number()
|
|
216
216
|
|
|
217
|
-
> `static` **number**(`property`, `value`, `failures`, `fieldNameResource
|
|
217
|
+
> `static` **number**(`property`, `value`, `failures`, `fieldNameResource?`, `options?`): `value is number`
|
|
218
218
|
|
|
219
219
|
Is the property a number.
|
|
220
220
|
|
|
@@ -270,7 +270,7 @@ True if the value is a valid number.
|
|
|
270
270
|
|
|
271
271
|
### integer()
|
|
272
272
|
|
|
273
|
-
> `static` **integer**(`property`, `value`, `failures`, `fieldNameResource
|
|
273
|
+
> `static` **integer**(`property`, `value`, `failures`, `fieldNameResource?`, `options?`): `value is number`
|
|
274
274
|
|
|
275
275
|
Is the property an integer.
|
|
276
276
|
|
|
@@ -326,7 +326,7 @@ True if the value is a valid integer.
|
|
|
326
326
|
|
|
327
327
|
### bigint()
|
|
328
328
|
|
|
329
|
-
> `static` **bigint**(`property`, `value`, `failures`, `fieldNameResource
|
|
329
|
+
> `static` **bigint**(`property`, `value`, `failures`, `fieldNameResource?`, `options?`): `value is bigint`
|
|
330
330
|
|
|
331
331
|
Is the property a bigint.
|
|
332
332
|
|
|
@@ -382,7 +382,7 @@ True if the value is a valid bigint.
|
|
|
382
382
|
|
|
383
383
|
### boolean()
|
|
384
384
|
|
|
385
|
-
> `static` **boolean**(`property`, `value`, `failures`, `fieldNameResource
|
|
385
|
+
> `static` **boolean**(`property`, `value`, `failures`, `fieldNameResource?`): `value is boolean`
|
|
386
386
|
|
|
387
387
|
Is the property a boolean.
|
|
388
388
|
|
|
@@ -422,7 +422,7 @@ True if the value is a boolean.
|
|
|
422
422
|
|
|
423
423
|
### date()
|
|
424
424
|
|
|
425
|
-
> `static` **date**(`property`, `value`, `failures`, `fieldNameResource
|
|
425
|
+
> `static` **date**(`property`, `value`, `failures`, `fieldNameResource?`): `value is Date`
|
|
426
426
|
|
|
427
427
|
Is the property a date.
|
|
428
428
|
|
|
@@ -462,7 +462,7 @@ True if the value is a date.
|
|
|
462
462
|
|
|
463
463
|
### dateString()
|
|
464
464
|
|
|
465
|
-
> `static` **dateString**(`property`, `value`, `failures`, `fieldNameResource
|
|
465
|
+
> `static` **dateString**(`property`, `value`, `failures`, `fieldNameResource?`): `value is string`
|
|
466
466
|
|
|
467
467
|
Is the property a date in ISO 8601 format.
|
|
468
468
|
|
|
@@ -502,7 +502,7 @@ True if the value is a date.
|
|
|
502
502
|
|
|
503
503
|
### dateTimeString()
|
|
504
504
|
|
|
505
|
-
> `static` **dateTimeString**(`property`, `value`, `failures`, `fieldNameResource
|
|
505
|
+
> `static` **dateTimeString**(`property`, `value`, `failures`, `fieldNameResource?`): `value is string`
|
|
506
506
|
|
|
507
507
|
Is the property a date/time in ISO 8601 format.
|
|
508
508
|
|
|
@@ -542,7 +542,7 @@ True if the value is a date/time.
|
|
|
542
542
|
|
|
543
543
|
### timeString()
|
|
544
544
|
|
|
545
|
-
> `static` **timeString**(`property`, `value`, `failures`, `fieldNameResource
|
|
545
|
+
> `static` **timeString**(`property`, `value`, `failures`, `fieldNameResource?`): `value is string`
|
|
546
546
|
|
|
547
547
|
Is the property a time in ISO 8601 format.
|
|
548
548
|
|
|
@@ -582,7 +582,7 @@ True if the value is a time.
|
|
|
582
582
|
|
|
583
583
|
### timestampMilliseconds()
|
|
584
584
|
|
|
585
|
-
> `static` **timestampMilliseconds**(`property`, `value`, `failures`, `fieldNameResource
|
|
585
|
+
> `static` **timestampMilliseconds**(`property`, `value`, `failures`, `fieldNameResource?`): `value is number`
|
|
586
586
|
|
|
587
587
|
Is the property a timestamp in milliseconds.
|
|
588
588
|
|
|
@@ -622,7 +622,7 @@ True if the value is a timestamp in milliseconds.
|
|
|
622
622
|
|
|
623
623
|
### timestampSeconds()
|
|
624
624
|
|
|
625
|
-
> `static` **timestampSeconds**(`property`, `value`, `failures`, `fieldNameResource
|
|
625
|
+
> `static` **timestampSeconds**(`property`, `value`, `failures`, `fieldNameResource?`): `value is number`
|
|
626
626
|
|
|
627
627
|
Is the property a timestamp in seconds.
|
|
628
628
|
|
|
@@ -662,13 +662,15 @@ True if the value is a timestamp in seconds.
|
|
|
662
662
|
|
|
663
663
|
### object()
|
|
664
664
|
|
|
665
|
-
> `static` **object**\<`T`\>(`property`, `value`, `failures`, `fieldNameResource
|
|
665
|
+
> `static` **object**\<`T`\>(`property`, `value`, `failures`, `fieldNameResource?`): `value is T`
|
|
666
666
|
|
|
667
667
|
Is the property an object.
|
|
668
668
|
|
|
669
669
|
#### Type Parameters
|
|
670
670
|
|
|
671
|
-
|
|
671
|
+
##### T
|
|
672
|
+
|
|
673
|
+
`T` = \{[`id`: `string`]: `unknown`; \}
|
|
672
674
|
|
|
673
675
|
#### Parameters
|
|
674
676
|
|
|
@@ -706,13 +708,15 @@ True if the value is a object.
|
|
|
706
708
|
|
|
707
709
|
### array()
|
|
708
710
|
|
|
709
|
-
> `static` **array**\<`T`\>(`property`, `value`, `failures`, `fieldNameResource
|
|
711
|
+
> `static` **array**\<`T`\>(`property`, `value`, `failures`, `fieldNameResource?`): `value is T[]`
|
|
710
712
|
|
|
711
713
|
Is the property an array.
|
|
712
714
|
|
|
713
715
|
#### Type Parameters
|
|
714
716
|
|
|
715
|
-
|
|
717
|
+
##### T
|
|
718
|
+
|
|
719
|
+
`T`
|
|
716
720
|
|
|
717
721
|
#### Parameters
|
|
718
722
|
|
|
@@ -750,13 +754,15 @@ True if the value is an array.
|
|
|
750
754
|
|
|
751
755
|
### arrayValue()
|
|
752
756
|
|
|
753
|
-
> `static` **arrayValue**\<`T`\>(`property`, `value`, `failures`, `fieldNameResource
|
|
757
|
+
> `static` **arrayValue**\<`T`\>(`property`, `value`, `failures`, `fieldNameResource?`): `value is T[]`
|
|
754
758
|
|
|
755
759
|
Is the property an array with at least one item.
|
|
756
760
|
|
|
757
761
|
#### Type Parameters
|
|
758
762
|
|
|
759
|
-
|
|
763
|
+
##### T
|
|
764
|
+
|
|
765
|
+
`T`
|
|
760
766
|
|
|
761
767
|
#### Parameters
|
|
762
768
|
|
|
@@ -794,13 +800,15 @@ True if the value is an array with at least one element.
|
|
|
794
800
|
|
|
795
801
|
### arrayOneOf()
|
|
796
802
|
|
|
797
|
-
> `static` **arrayOneOf**\<`T`\>(`property`, `value`, `options`, `failures`, `fieldNameResource
|
|
803
|
+
> `static` **arrayOneOf**\<`T`\>(`property`, `value`, `options`, `failures`, `fieldNameResource?`): `value is T`
|
|
798
804
|
|
|
799
805
|
Is the property one of a list of items.
|
|
800
806
|
|
|
801
807
|
#### Type Parameters
|
|
802
808
|
|
|
803
|
-
|
|
809
|
+
##### T
|
|
810
|
+
|
|
811
|
+
`T`
|
|
804
812
|
|
|
805
813
|
#### Parameters
|
|
806
814
|
|
|
@@ -844,7 +852,7 @@ True if the value is one of the items in the options.
|
|
|
844
852
|
|
|
845
853
|
### uint8Array()
|
|
846
854
|
|
|
847
|
-
> `static` **uint8Array**(`property`, `value`, `failures`, `fieldNameResource
|
|
855
|
+
> `static` **uint8Array**(`property`, `value`, `failures`, `fieldNameResource?`): `value is Uint8Array<ArrayBufferLike>`
|
|
848
856
|
|
|
849
857
|
Is the property a Uint8Array.
|
|
850
858
|
|
|
@@ -884,7 +892,7 @@ True if the value is a Uint8Array.
|
|
|
884
892
|
|
|
885
893
|
### json()
|
|
886
894
|
|
|
887
|
-
> `static` **json**(`property`, `value`, `failures`, `fieldNameResource
|
|
895
|
+
> `static` **json**(`property`, `value`, `failures`, `fieldNameResource?`): `value is string`
|
|
888
896
|
|
|
889
897
|
Is the property valid JSON.
|
|
890
898
|
|
|
@@ -924,7 +932,7 @@ True if the value is valid JSON.
|
|
|
924
932
|
|
|
925
933
|
### email()
|
|
926
934
|
|
|
927
|
-
> `static` **email**(`property`, `value`, `failures`, `fieldNameResource
|
|
935
|
+
> `static` **email**(`property`, `value`, `failures`, `fieldNameResource?`): `value is string`
|
|
928
936
|
|
|
929
937
|
Is the property a string in e-mail format.
|
|
930
938
|
|
|
@@ -8,9 +8,9 @@ Class to handle errors which are triggered by entity validation.
|
|
|
8
8
|
|
|
9
9
|
## Constructors
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Constructor
|
|
12
12
|
|
|
13
|
-
> **new ValidationError**(`source`, `validationObject`, `validationFailures`):
|
|
13
|
+
> **new ValidationError**(`source`, `validationObject`, `validationFailures`): `ValidationError`
|
|
14
14
|
|
|
15
15
|
Create a new instance of ValidationError.
|
|
16
16
|
|
|
@@ -36,11 +36,11 @@ The validation failures.
|
|
|
36
36
|
|
|
37
37
|
#### Returns
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
`ValidationError`
|
|
40
40
|
|
|
41
41
|
#### Overrides
|
|
42
42
|
|
|
43
|
-
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#
|
|
43
|
+
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#constructor)
|
|
44
44
|
|
|
45
45
|
## Properties
|
|
46
46
|
|
|
@@ -52,7 +52,7 @@ The source of the error.
|
|
|
52
52
|
|
|
53
53
|
#### Inherited from
|
|
54
54
|
|
|
55
|
-
[`BaseError`](BaseError.md).[`source`](BaseError.md#source
|
|
55
|
+
[`BaseError`](BaseError.md).[`source`](BaseError.md#source)
|
|
56
56
|
|
|
57
57
|
***
|
|
58
58
|
|
|
@@ -68,7 +68,7 @@ Any additional information for the error.
|
|
|
68
68
|
|
|
69
69
|
#### Inherited from
|
|
70
70
|
|
|
71
|
-
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties
|
|
71
|
+
[`BaseError`](BaseError.md).[`properties`](BaseError.md#properties)
|
|
72
72
|
|
|
73
73
|
***
|
|
74
74
|
|
|
@@ -80,7 +80,7 @@ The inner error if there was one.
|
|
|
80
80
|
|
|
81
81
|
#### Inherited from
|
|
82
82
|
|
|
83
|
-
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner
|
|
83
|
+
[`BaseError`](BaseError.md).[`inner`](BaseError.md#inner)
|
|
84
84
|
|
|
85
85
|
***
|
|
86
86
|
|
package/docs/reference/index.md
CHANGED
|
@@ -38,12 +38,14 @@
|
|
|
38
38
|
- [Guards](classes/Guards.md)
|
|
39
39
|
- [I18n](classes/I18n.md)
|
|
40
40
|
- [Is](classes/Is.md)
|
|
41
|
+
- [SharedStore](classes/SharedStore.md)
|
|
41
42
|
- [Validation](classes/Validation.md)
|
|
42
43
|
|
|
43
44
|
## Interfaces
|
|
44
45
|
|
|
45
46
|
- [IComponent](interfaces/IComponent.md)
|
|
46
47
|
- [IError](interfaces/IError.md)
|
|
48
|
+
- [II18nShared](interfaces/II18nShared.md)
|
|
47
49
|
- [IKeyValue](interfaces/IKeyValue.md)
|
|
48
50
|
- [ILabelledValue](interfaces/ILabelledValue.md)
|
|
49
51
|
- [ILocale](interfaces/ILocale.md)
|
|
@@ -14,7 +14,7 @@ The name of the component.
|
|
|
14
14
|
|
|
15
15
|
### bootstrap()?
|
|
16
16
|
|
|
17
|
-
> `optional` **bootstrap**(`nodeLoggingConnectorType`, `componentState
|
|
17
|
+
> `optional` **bootstrap**(`nodeLoggingConnectorType`, `componentState?`): `Promise`\<`boolean`\>
|
|
18
18
|
|
|
19
19
|
Bootstrap the component by creating and initializing any resources it needs.
|
|
20
20
|
|
|
@@ -40,7 +40,7 @@ True if the bootstrapping process was successful.
|
|
|
40
40
|
|
|
41
41
|
### start()?
|
|
42
42
|
|
|
43
|
-
> `optional` **start**(`nodeIdentity`, `nodeLoggingConnectorType`, `componentState
|
|
43
|
+
> `optional` **start**(`nodeIdentity`, `nodeLoggingConnectorType`, `componentState?`): `Promise`\<`void`\>
|
|
44
44
|
|
|
45
45
|
The component needs to be started when the node is initialized.
|
|
46
46
|
|
|
@@ -72,7 +72,7 @@ Nothing.
|
|
|
72
72
|
|
|
73
73
|
### stop()?
|
|
74
74
|
|
|
75
|
-
> `optional` **stop**(`nodeIdentity`, `nodeLoggingConnectorType`, `componentState
|
|
75
|
+
> `optional` **stop**(`nodeIdentity`, `nodeLoggingConnectorType`, `componentState?`): `Promise`\<`void`\>
|
|
76
76
|
|
|
77
77
|
The component needs to be stopped when the node is closed.
|
|
78
78
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Interface: II18nShared
|
|
2
|
+
|
|
3
|
+
The shared state for the I18n global.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### localeDictionaries
|
|
8
|
+
|
|
9
|
+
> **localeDictionaries**: `object`
|
|
10
|
+
|
|
11
|
+
Dictionaries for lookups.
|
|
12
|
+
|
|
13
|
+
#### Index Signature
|
|
14
|
+
|
|
15
|
+
\[`locale`: `string`\]: `object`
|
|
16
|
+
|
|
17
|
+
***
|
|
18
|
+
|
|
19
|
+
### currentLocale
|
|
20
|
+
|
|
21
|
+
> **currentLocale**: `string`
|
|
22
|
+
|
|
23
|
+
The current locale.
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
|
|
27
|
+
### localeChangedHandlers
|
|
28
|
+
|
|
29
|
+
> **localeChangedHandlers**: `object`
|
|
30
|
+
|
|
31
|
+
Change handler for the locale being updated.
|
|
32
|
+
|
|
33
|
+
#### Index Signature
|
|
34
|
+
|
|
35
|
+
\[`id`: `string`\]: (`locale`) => `void`
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### dictionaryChangedHandlers
|
|
40
|
+
|
|
41
|
+
> **dictionaryChangedHandlers**: `object`
|
|
42
|
+
|
|
43
|
+
Change handler for the dictionaries being updated.
|
|
44
|
+
|
|
45
|
+
#### Index Signature
|
|
46
|
+
|
|
47
|
+
\[`id`: `string`\]: (`locale`) => `void`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Type Alias: CoerceType
|
|
2
2
|
|
|
3
|
-
> **CoerceType
|
|
3
|
+
> **CoerceType** = *typeof* [`CoerceType`](../variables/CoerceType.md)\[keyof *typeof* [`CoerceType`](../variables/CoerceType.md)\]
|
|
4
4
|
|
|
5
5
|
The types the extracted data can be coerced to.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Type Alias: CompressionType
|
|
2
2
|
|
|
3
|
-
> **CompressionType
|
|
3
|
+
> **CompressionType** = *typeof* [`CompressionType`](../variables/CompressionType.md)\[keyof *typeof* [`CompressionType`](../variables/CompressionType.md)\]
|
|
4
4
|
|
|
5
5
|
Compression types.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/core",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.53",
|
|
4
4
|
"description": "Helper methods/classes for data type checking/validation/guarding/error handling",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@twin.org/nameof": "next",
|
|
18
|
-
"intl-messageformat": "10.7.
|
|
18
|
+
"intl-messageformat": "10.7.16",
|
|
19
19
|
"rfc6902": "5.1.2"
|
|
20
20
|
},
|
|
21
21
|
"main": "./dist/cjs/index.cjs",
|