typia 5.5.0-dev.20240305 → 5.5.0
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 -0
- package/lib/http.d.ts +15 -6
- package/lib/http.js.map +1 -1
- package/lib/json.d.ts +17 -8
- package/lib/json.js.map +1 -1
- package/lib/misc.d.ts +18 -8
- package/lib/misc.js.map +1 -1
- package/lib/module.d.ts +17 -0
- package/lib/module.js.map +1 -1
- package/lib/notations.d.ts +12 -0
- package/lib/notations.js.map +1 -1
- package/lib/protobuf.d.ts +8 -0
- package/lib/protobuf.js.map +1 -1
- package/package.json +1 -1
- package/src/http.ts +15 -6
- package/src/json.ts +17 -8
- package/src/misc.ts +18 -8
- package/src/module.ts +17 -0
- package/src/notations.ts +12 -0
- package/src/protobuf.ts +8 -0
package/README.md
CHANGED
|
@@ -78,6 +78,7 @@ Check out the document in the [website](https://typia.io/docs/):
|
|
|
78
78
|
- [`assert()` function](https://typia.io/docs/validators/assert/)
|
|
79
79
|
- [`is()` function](https://typia.io/docs/validators/is/)
|
|
80
80
|
- [`validate()` function](https://typia.io/docs/validators/validate/)
|
|
81
|
+
- [Functional Module](https://typia.io/docs/validators/functional)
|
|
81
82
|
- [Special Tags](https://typia.io/docs/validators/tags/)
|
|
82
83
|
- Enhanced JSON
|
|
83
84
|
- [`stringify()` functions](https://typia.io/docs/json/stringify/)
|
package/lib/http.d.ts
CHANGED
|
@@ -42,8 +42,8 @@ export { formDataPure as formData };
|
|
|
42
42
|
*
|
|
43
43
|
* Also, after decoding, `typia.http.assertFormData()` performs type assertion to
|
|
44
44
|
* the decoded value by combining with {@link assert} function. Therefore, when
|
|
45
|
-
* the decoded value is not following the `T` type, {@link TypeGuardError}
|
|
46
|
-
* be thrown.
|
|
45
|
+
* the decoded value is not following the `T` type, {@link TypeGuardError} or
|
|
46
|
+
* custom error generated by *errorFactory* would be thrown.
|
|
47
47
|
*
|
|
48
48
|
* By the way, as `FormData` is not enough to express complex data structures,
|
|
49
49
|
* `typia.http.assertFormData()` function has some limitations. If target type `T`
|
|
@@ -56,6 +56,7 @@ export { formDataPure as formData };
|
|
|
56
56
|
*
|
|
57
57
|
* @template T Expected type of decoded value
|
|
58
58
|
* @param input FormData instance
|
|
59
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
59
60
|
* @returns Decoded form FormData
|
|
60
61
|
*
|
|
61
62
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -169,8 +170,8 @@ export { queryPure as query };
|
|
|
169
170
|
*
|
|
170
171
|
* Also, after decoding, `typia.http.assertQuery()` performs type assertion to the
|
|
171
172
|
* decoded value by combining with {@link assert} function. Therefore, when the
|
|
172
|
-
* decoded value is not following the `T` type, {@link TypeGuardError}
|
|
173
|
-
* thrown.
|
|
173
|
+
* decoded value is not following the `T` type, {@link TypeGuardError} or custom
|
|
174
|
+
* error generated by *errorFactory* would be thrown.
|
|
174
175
|
*
|
|
175
176
|
* By the way, as URL query is not enough to express complex data structures,
|
|
176
177
|
* `typia.http.assertQuery()` function has some limitations. If target type `T` is
|
|
@@ -183,6 +184,7 @@ export { queryPure as query };
|
|
|
183
184
|
*
|
|
184
185
|
* @template T Expected type of decoded value
|
|
185
186
|
* @param input Query string or URLSearchParams instance
|
|
187
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
186
188
|
* @returns Decoded query object
|
|
187
189
|
*
|
|
188
190
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -316,8 +318,8 @@ export { headersPure as headers };
|
|
|
316
318
|
*
|
|
317
319
|
* Also, after decoding, `typia.http.assertHeaders()` performs type assertion to the
|
|
318
320
|
* decoded value by combining with {@link assert} function. Therefore, when the
|
|
319
|
-
* decoded value is not following the `T` type, {@link TypeGuardError}
|
|
320
|
-
* thrown.
|
|
321
|
+
* decoded value is not following the `T` type, {@link TypeGuardError} or custom
|
|
322
|
+
* error generated by *errorFactory* would be thrown.
|
|
321
323
|
*
|
|
322
324
|
* By the way, as HTTP headers are not enough to express complex data structures,
|
|
323
325
|
* `typia.http.headers()` function has some limitations. If target type `T` is not
|
|
@@ -352,6 +354,7 @@ export { headersPure as headers };
|
|
|
352
354
|
*
|
|
353
355
|
* @template T Expected type of decoded value
|
|
354
356
|
* @param input Query string or URLSearchParams instance
|
|
357
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
355
358
|
* @returns Decoded headers object
|
|
356
359
|
*
|
|
357
360
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -510,6 +513,7 @@ export { createFormDataPure as createFormData };
|
|
|
510
513
|
*
|
|
511
514
|
* @danger You must configure the generic argument `T`
|
|
512
515
|
* @template T The type of the formdata object
|
|
516
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
513
517
|
* @throws compile error
|
|
514
518
|
*
|
|
515
519
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -519,6 +523,7 @@ declare function createAssertFormData(errorFactory?: undefined | ((props: TypeGu
|
|
|
519
523
|
* Creates a reusable {@link assertFormData} function.
|
|
520
524
|
*
|
|
521
525
|
* @template T The type of the formdata object
|
|
526
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
522
527
|
* @returns A reusable `assertFormData` function
|
|
523
528
|
*
|
|
524
529
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -594,6 +599,7 @@ export { createQueryPure as createQuery };
|
|
|
594
599
|
*
|
|
595
600
|
* @danger You must configure the generic argument `T`
|
|
596
601
|
* @template T The type of the query object
|
|
602
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
597
603
|
* @throws compile error
|
|
598
604
|
*
|
|
599
605
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -603,6 +609,7 @@ declare function createAssertQuery(errorFactory?: undefined | ((props: TypeGuard
|
|
|
603
609
|
* Creates a reusable {@link assertQuery} function.
|
|
604
610
|
*
|
|
605
611
|
* @template T The type of the query object
|
|
612
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
606
613
|
* @returns A reusable `assertQuery` function
|
|
607
614
|
*
|
|
608
615
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -678,6 +685,7 @@ export { createHeadersPure as createHeaders };
|
|
|
678
685
|
*
|
|
679
686
|
* @danger You must configure the generic argument `T`
|
|
680
687
|
* @template T The type of the headers object
|
|
688
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
681
689
|
* @throws compile error
|
|
682
690
|
*
|
|
683
691
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -687,6 +695,7 @@ declare function createAssertHeaders(errorFactory?: undefined | ((props: TypeGua
|
|
|
687
695
|
* Creates a reusable {@link assertHeaders} function.
|
|
688
696
|
*
|
|
689
697
|
* @template T The type of the headers object
|
|
698
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
690
699
|
* @returns A reusable `assertHeaders` function
|
|
691
700
|
*
|
|
692
701
|
* @author Jeongho Nam - https://github.com/samchon
|
package/lib/http.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAoD;AA+CpD;;GAEG;AACH,SAAS,QAAQ;IACf,IAAI,CAAC,UAAU,CAAC,CAAC;AACnB,CAAC;AACD,IAAM,YAAY,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CACjD,QAAQ;AACR,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,CAC3C,CAAC;AACuB,gCAAQ;
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAoD;AA+CpD;;GAEG;AACH,SAAS,QAAQ;IACf,IAAI,CAAC,UAAU,CAAC,CAAC;AACnB,CAAC;AACD,IAAM,YAAY,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AAC,0BAA0B,CAAC,CAC9D,CAAC;AACkC,sDAAmB;AAyBvD;;GAEG;AACH,SAAS,eAAe;IAGtB,IAAI,CAAC,iBAAiB,CAAC,CAAC;AAC1B,CAAC;AAED,IAAM,mBAAmB,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAKxD,eAAe;AACf,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE;AACzC,gBAAgB,CAAC,SAAS,CAAC,EAAE,EAAE,CAChC,CAAC;AAC8B,8CAAe;AAyB/C;;GAEG;AACH,SAAS,qBAAqB;IAG5B,IAAI,CAAC,uBAAuB,CAAC,CAAC;AAChC,CAAC;AAED,IAAM,yBAAyB,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAK9D,qBAAqB;AACrB,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE;AACzC,gBAAgB,CAAC,SAAS,CAAC,QAAQ,EAAE,CACtC,CAAC;AACoC,0DAAqB;AAuB3D;;GAEG;AACH,SAAS,eAAe;IACtB,IAAI,CAAC,iBAAiB,CAAC,CAAC;AAC1B,CAAC;AAED,IAAM,mBAAmB,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAKxD,eAAe;AACf,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE;AAC3C,gBAAgB,CAAC,SAAS,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAC1D,CAAC;AAC8B,8CAAe;AAE/C;;GAEG;AACH,SAAS,IAAI,CAAC,IAAY;IACxB,MAAM,IAAI,KAAK,CACb,8BAAuB,IAAI,8FAA2F,CACvH,CAAC;AACJ,CAAC"}
|
package/lib/json.d.ts
CHANGED
|
@@ -66,11 +66,12 @@ export declare function application<Types extends unknown[], Purpose extends "aj
|
|
|
66
66
|
* to a `T` typed instance with type assertion.
|
|
67
67
|
*
|
|
68
68
|
* In such reason, when parsed JSON string value is not matched with the type `T`, it
|
|
69
|
-
* throws {@link TypeGuardError}
|
|
70
|
-
* the parsed value would be returned.
|
|
69
|
+
* throws {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
|
|
70
|
+
* there's no problem on the parsed value, the parsed value would be returned.
|
|
71
71
|
*
|
|
72
72
|
* @template T Expected type of parsed value
|
|
73
73
|
* @param input JSON string
|
|
74
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
74
75
|
* @returns Parsed value
|
|
75
76
|
*
|
|
76
77
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -84,11 +85,13 @@ declare function assertParse(input: string, errorFactory?: undefined | ((props:
|
|
|
84
85
|
* to a `T` typed instance with type assertion.
|
|
85
86
|
*
|
|
86
87
|
* In such reason, when parsed JSON string value is not matched with the type `T`,
|
|
87
|
-
* it throws {@link TypeGuardError}
|
|
88
|
-
* value, the parsed value would be
|
|
88
|
+
* it throws {@link TypeGuardError} or custom error generated by *errorFactory*.
|
|
89
|
+
* Otherwise, there's no problem on the parsed value, the parsed value would be
|
|
90
|
+
* returned.
|
|
89
91
|
*
|
|
90
92
|
* @template T Expected type of parsed value
|
|
91
93
|
* @param input JSON string
|
|
94
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
92
95
|
* @returns Parsed value
|
|
93
96
|
*
|
|
94
97
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -211,8 +214,8 @@ export { stringifyPure as stringify };
|
|
|
211
214
|
* JSON (JavaScript Object Notation) string, with type assertion.
|
|
212
215
|
*
|
|
213
216
|
* In such reason, when `input` value is not matched with the type `T`, it throws an
|
|
214
|
-
* {@link TypeGuardError}
|
|
215
|
-
* string would be returned.
|
|
217
|
+
* {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
|
|
218
|
+
* there's no problem on the `input` value, JSON string would be returned.
|
|
216
219
|
*
|
|
217
220
|
* For reference, with type assertion, it is even 5x times faster than the native
|
|
218
221
|
* `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
|
|
@@ -220,6 +223,7 @@ export { stringifyPure as stringify };
|
|
|
220
223
|
*
|
|
221
224
|
* @template T Type of the input value
|
|
222
225
|
* @param input A value to be asserted and converted
|
|
226
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
223
227
|
* @return JSON string value
|
|
224
228
|
*
|
|
225
229
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -233,8 +237,8 @@ declare function assertStringify<T>(input: T, errorFactory?: undefined | ((props
|
|
|
233
237
|
* JSON (JavaScript Object Notation) string, with type assertion.
|
|
234
238
|
*
|
|
235
239
|
* In such reason, when `input` value is not matched with the type `T`, it throws an
|
|
236
|
-
* {@link TypeGuardError}
|
|
237
|
-
* string would be returned.
|
|
240
|
+
* {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
|
|
241
|
+
* there's no problem on the `input` value, JSON string would be returned.
|
|
238
242
|
*
|
|
239
243
|
* For reference, with type assertion, it is even 5x times faster than the native
|
|
240
244
|
* `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
|
|
@@ -242,6 +246,7 @@ declare function assertStringify<T>(input: T, errorFactory?: undefined | ((props
|
|
|
242
246
|
*
|
|
243
247
|
* @template T Type of the input value
|
|
244
248
|
* @param input A value to be asserted and converted
|
|
249
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
245
250
|
* @return JSON string value
|
|
246
251
|
*
|
|
247
252
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -369,6 +374,7 @@ export { createIsParsePure as createIsParse };
|
|
|
369
374
|
*
|
|
370
375
|
* @danger You must configure the generic argument `T`
|
|
371
376
|
* @returns Nothing until you configure the generic argument `T`
|
|
377
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
372
378
|
* @throws compile error
|
|
373
379
|
*
|
|
374
380
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -378,6 +384,7 @@ declare function createAssertParse(errorFactory?: undefined | ((props: TypeGuard
|
|
|
378
384
|
* Creates a reusable {@link assertParse} function.
|
|
379
385
|
*
|
|
380
386
|
* @template T Expected type of parsed value
|
|
387
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
381
388
|
* @returns A reusable `assertParse` function
|
|
382
389
|
*
|
|
383
390
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -431,6 +438,7 @@ export { createStringifyPure as createStringify };
|
|
|
431
438
|
* Creates a reusable {@link assertStringify} function.
|
|
432
439
|
*
|
|
433
440
|
* @danger You must configure the generic argument `T`
|
|
441
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
434
442
|
* @returns Nothing until you configure the generic argument `T`
|
|
435
443
|
* @throws compile error
|
|
436
444
|
*
|
|
@@ -441,6 +449,7 @@ declare function createAssertStringify(errorFactory?: undefined | ((props: TypeG
|
|
|
441
449
|
* Creates a reusable {@link assertStringify} function.
|
|
442
450
|
*
|
|
443
451
|
* @template T Type of the input value
|
|
452
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
444
453
|
* @returns A reusable `assertStringify` function
|
|
445
454
|
*
|
|
446
455
|
* @author Jeongho Nam - https://github.com/samchon
|
package/lib/json.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"","sources":["../src/json.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAoD;AA6EpD;;GAEG;AACH,SAAgB,WAAW;IACzB,IAAI,CAAC,aAAa,CAAC,CAAC;AACtB,CAAC;AAFD,kCAEC;
|
|
1
|
+
{"version":3,"file":"json.js","sourceRoot":"","sources":["../src/json.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAoD;AA6EpD;;GAEG;AACH,SAAgB,WAAW;IACzB,IAAI,CAAC,aAAa,CAAC,CAAC;AACtB,CAAC;AAFD,kCAEC;AAsDD;;GAEG;AACH,SAAS,WAAW;IAClB,IAAI,CAAC,aAAa,CAAC,CAAC;A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CAAC,MAAM,CAGxD,eAAe,EAAE,aAAa,CAAC,CAAC;AACF,8CAAe;AA6B/C;;GAEG;AACH,SAAS,qBAAqB;IAC5B,IAAI,CAAC,uBAAuB,CAAC,CAAC;AAChC,CAAC;AAED,IAAM,yBAAyB,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAG9D,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;AACR,0DAAqB;AAuB3D;;GAEG;AACH,SAAS,iBAAiB;IACxB,IAAI,CAAC,mBAAmB,CAAC,CAAC;AAC5B,CAAC;AAED,IAAM,qBAAqB,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAG1D,iBAAiB,EAAE,eAAe,CAAC,CAAC;AACJ,kDAAiB;AAuBnD;;GAEG;AACH,SAAS,uBAAuB;IAC9B,IAAI,CAAC,yBAAyB,CAAC,CAAC;AAClC,CAAC;AAED,IAAM,2BAA2B,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAGhE,uBAAuB,EAAE,qBAAqB,CAAC,CAAC;AACV,8DAAuB;AAE/D;;GAEG;AACH,SAAS,IAAI,CAAC,IAAY;IACxB,MAAM,IAAI,KAAK,CACb,8BAAuB,IAAI,8FAA2F,CACvH,CAAC;AACJ,CAAC"}
|
package/lib/misc.d.ts
CHANGED
|
@@ -63,11 +63,12 @@ export { clonePure as clone };
|
|
|
63
63
|
* methods would not be cloned.
|
|
64
64
|
*
|
|
65
65
|
* In such reason, when `input` value is not matched with the type `T`, it throws an
|
|
66
|
-
* {@link TypeGuardError}
|
|
67
|
-
* data would be returned.
|
|
66
|
+
* {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
|
|
67
|
+
* there's no problem on the `input` value, cloned data would be returned.
|
|
68
68
|
*
|
|
69
69
|
* @template T Type of the input value
|
|
70
70
|
* @param input A value to be cloned
|
|
71
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
71
72
|
* @return Cloned data
|
|
72
73
|
*
|
|
73
74
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -81,11 +82,12 @@ declare function assertClone<T>(input: T, errorFactory?: undefined | ((props: Ty
|
|
|
81
82
|
* methods would not be cloned.
|
|
82
83
|
*
|
|
83
84
|
* In such reason, when `input` value is not matched with the type `T`, it throws an
|
|
84
|
-
* {@link TypeGuardError}
|
|
85
|
-
* data would be returned.
|
|
85
|
+
* {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
|
|
86
|
+
* there's no problem on the `input` value, cloned data would be returned.
|
|
86
87
|
*
|
|
87
88
|
* @template T Type of the input value
|
|
88
89
|
* @param input A value to be cloned
|
|
90
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
89
91
|
* @return Cloned data
|
|
90
92
|
*
|
|
91
93
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -199,11 +201,13 @@ export { prunePure as prune };
|
|
|
199
201
|
* object including nested objects, with type assertion.
|
|
200
202
|
*
|
|
201
203
|
* In such reason, when `input` value is not matched with the type `T`, it throws an
|
|
202
|
-
* {@link TypeGuardError}
|
|
203
|
-
* every superfluous properties would be
|
|
204
|
+
* {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
|
|
205
|
+
* there's no problem on the `input` value, its every superfluous properties would be
|
|
206
|
+
* removed, including nested objects.
|
|
204
207
|
*
|
|
205
208
|
* @template T Type of the input value
|
|
206
209
|
* @param input Target instance to assert and prune
|
|
210
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
207
211
|
*
|
|
208
212
|
* @author Jeongho Nam - https://github.com/samchon
|
|
209
213
|
*/
|
|
@@ -216,11 +220,13 @@ declare function assertPrune<T>(input: T, errorFactory?: undefined | ((props: Ty
|
|
|
216
220
|
* object including nested objects, with type assertion.
|
|
217
221
|
*
|
|
218
222
|
* In such reason, when `input` value is not matched with the type `T`, it throws an
|
|
219
|
-
* {@link TypeGuardError}
|
|
220
|
-
* every superfluous properties would be removed,
|
|
223
|
+
* {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise, there's
|
|
224
|
+
* no problem on the `input` value, its every superfluous properties would be removed,
|
|
225
|
+
* including nested objects.
|
|
221
226
|
*
|
|
222
227
|
* @template T Type of the input value
|
|
223
228
|
* @param input Target instance to assert and prune
|
|
229
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
224
230
|
*
|
|
225
231
|
* @author Jeongho Nam - https://github.com/samchon
|
|
226
232
|
*/
|
|
@@ -330,6 +336,7 @@ export { createClonePure as createClone };
|
|
|
330
336
|
* Creates a reusable {@link assertClone} function.
|
|
331
337
|
*
|
|
332
338
|
* @danger You must configure the generic argument `T`
|
|
339
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
333
340
|
* @returns Nothing until you configure the generic argument `T`
|
|
334
341
|
* @throws compile error
|
|
335
342
|
*
|
|
@@ -340,6 +347,7 @@ declare function createAssertClone(errorFactory?: undefined | ((props: TypeGuard
|
|
|
340
347
|
* Creates a resuable {@link assertClone} function.
|
|
341
348
|
*
|
|
342
349
|
* @template T Type of the input value
|
|
350
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
343
351
|
* @returns A reusable `clone` function
|
|
344
352
|
*
|
|
345
353
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -414,6 +422,7 @@ export { createPrunePure as createPrune };
|
|
|
414
422
|
* Creates a reusable {@link assertPrune} function.
|
|
415
423
|
*
|
|
416
424
|
* @danger You must configure the generic argument `T`
|
|
425
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
417
426
|
* @returns Nothing until you configure the generic argument `T`
|
|
418
427
|
* @throws compile error
|
|
419
428
|
*
|
|
@@ -424,6 +433,7 @@ declare function createAssertPrune(errorFactory?: undefined | ((props: TypeGuard
|
|
|
424
433
|
* Creates a resuable {@link assertPrune} function.
|
|
425
434
|
*
|
|
426
435
|
* @template T Type of the input value
|
|
436
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
427
437
|
* @returns A reusable `isPrune` function
|
|
428
438
|
*
|
|
429
439
|
* @author Jeongho Nam - https://github.com/samchon
|
package/lib/misc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"misc.js","sourceRoot":"","sources":["../src/misc.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;8DAQ8D;AAC9D,gEAAoD;AA0CpD;;GAEG;AACH,SAAgB,QAAQ;IACtB,IAAI,CAAC,UAAU,CAAC,CAAC;AACnB,CAAC;AAFD,4BAEC;AAyBD;;GAEG;AACH,SAAS,KAAK;IACZ,IAAI,CAAC,OAAO,CAAC,CAAC;AAChB,CAAC;AACD,IAAM,SAAS,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAC9C,KAAK;AACL,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAC/C,CAAC;AACoB,0BAAK;
|
|
1
|
+
{"version":3,"file":"misc.js","sourceRoot":"","sources":["../src/misc.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;8DAQ8D;AAC9D,gEAAoD;AA0CpD;;GAEG;AACH,SAAgB,QAAQ;IACtB,IAAI,CAAC,UAAU,CAAC,CAAC;AACnB,CAAC;AAFD,4BAEC;AAyBD;;GAEG;AACH,SAAS,KAAK;IACZ,IAAI,CAAC,OAAO,CAAC,CAAC;AAChB,CAAC;AACD,IAAM,SAAS,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAC9C,KAAK;AACL,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAC/C,CAAC;AACoB,0BAAK;AAgD3B;;GAEG;AACH,SAAS,WAAW;IAClB,IAAI,CAAC,aAAa,CAAC,CAAC;AACtB,CAAC;AACD,IAAM,eAAe,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAKpD,WAAW;AACX,gB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AC,qBAAqB,CAAC,CAAC;AAC9B,CAAC;AACD,IAAM,uBAAuB,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAG5D,mBAAmB,EAAE,iBAAiB,CAAC,CAAC;AACN,sDAAmB;AAuBvD;;GAEG;AACH,SAAS,WAAW;IAClB,IAAI,CAAC,aAAa,CAAC,CAAC;AACtB,CAAC;AACD,IAAM,eAAe,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CACpD,WAAW,EACX,SAAS,CACV,CAAC;AAC0B,sCAAW;AA6BvC;;GAEG;AACH,SAAS,iBAAiB;IACxB,IAAI,CAAC,mBAAmB,CAAC,CAAC;AAC5B,CAAC;AACD,IAAM,qBAAqB,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAG1D,iBAAiB,EAAE,eAAe,CAAC,CAAC;AACJ,kDAAiB;AAuBnD;;GAEG;AACH,SAAS,aAAa;IACpB,IAAI,CAAC,eAAe,CAAC,CAAC;AACxB,CAAC;AACD,IAAM,iBAAiB,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAGtD,aAAa,EAAE,WAAW,CAAC,CAAC;AACA,0CAAa;AAuB3C;;GAEG;AACH,SAAS,mBAAmB;IAC1B,IAAI,CAAC,qBAAqB,CAAC,CAAC;AAC9B,CAAC;AACD,IAAM,uBAAuB,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAG5D,mBAAmB,EAAE,iBAAiB,CAAC,CAAC;AACN,sDAAmB;AAEvD;;GAEG;AACH,SAAS,IAAI,CAAC,IAAY;IACxB,MAAM,IAAI,KAAK,CACb,8BAAuB,IAAI,8FAA2F,CACvH,CAAC;AACJ,CAAC"}
|
package/lib/module.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export * from "./SnakeCase";
|
|
|
42
42
|
*
|
|
43
43
|
* @template T Type of the input value
|
|
44
44
|
* @param input A value to be asserted
|
|
45
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
45
46
|
* @returns Parametric input value
|
|
46
47
|
* @throws A {@link TypeGuardError} instance with detailed reason
|
|
47
48
|
*
|
|
@@ -64,6 +65,7 @@ declare function assert<T>(input: T, errorFactory?: undefined | ((props: TypeGua
|
|
|
64
65
|
*
|
|
65
66
|
* @template T Type of the input value
|
|
66
67
|
* @param input A value to be asserted
|
|
68
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
67
69
|
* @returns Parametric input value casted as `T`
|
|
68
70
|
* @throws A {@link TypeGuardError} instance with detailed reason
|
|
69
71
|
*
|
|
@@ -92,6 +94,7 @@ export { assertPure as assert };
|
|
|
92
94
|
*
|
|
93
95
|
* @template T Type of the input value
|
|
94
96
|
* @param input A value to be asserted
|
|
97
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
95
98
|
* @throws A {@link TypeGuardError} instance with detailed reason
|
|
96
99
|
*
|
|
97
100
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -117,6 +120,7 @@ declare function assertGuard<T>(input: T, errorFactory?: undefined | ((props: Ty
|
|
|
117
120
|
*
|
|
118
121
|
* @template T Type of the input value
|
|
119
122
|
* @param input A value to be asserted
|
|
123
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
120
124
|
* @throws A {@link TypeGuardError} instance with detailed reason
|
|
121
125
|
*
|
|
122
126
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -142,6 +146,7 @@ export { assertGuardPure as assertGuard };
|
|
|
142
146
|
*
|
|
143
147
|
* @template T Type of the input value
|
|
144
148
|
* @param input A value to be tested
|
|
149
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
145
150
|
* @returns Whether the parametric value is following the type `T` or not
|
|
146
151
|
*
|
|
147
152
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -240,6 +245,7 @@ export { validatePure as validate };
|
|
|
240
245
|
*
|
|
241
246
|
* @template T Type of the input value
|
|
242
247
|
* @param input A value to be asserted
|
|
248
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
243
249
|
* @returns Parametric input value
|
|
244
250
|
* @throws A {@link TypeGuardError} instance with detailed reason
|
|
245
251
|
*
|
|
@@ -264,6 +270,7 @@ declare function assertEquals<T>(input: T, errorFactory?: undefined | ((props: T
|
|
|
264
270
|
*
|
|
265
271
|
* @template T Type of the input value
|
|
266
272
|
* @param input A value to be asserted
|
|
273
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
267
274
|
* @returns Parametric input value casted as `T`
|
|
268
275
|
* @throws A {@link TypeGuardError} instance with detailed reason
|
|
269
276
|
*
|
|
@@ -294,6 +301,7 @@ export { assertEqualsPure as assertEquals };
|
|
|
294
301
|
*
|
|
295
302
|
* @template T Type of the input value
|
|
296
303
|
* @param input A value to be asserted
|
|
304
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
297
305
|
* @returns Parametric input value casted as `T`
|
|
298
306
|
* @throws A {@link TypeGuardError} instance with detailed reason
|
|
299
307
|
*
|
|
@@ -322,6 +330,7 @@ declare function assertGuardEquals<T>(input: T, errorFactory?: undefined | ((pro
|
|
|
322
330
|
*
|
|
323
331
|
* @template T Type of the input value
|
|
324
332
|
* @param input A value to be asserted
|
|
333
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
325
334
|
* @returns Parametric input value casted as `T`
|
|
326
335
|
* @throws A {@link TypeGuardError} instance with detailed reason
|
|
327
336
|
*
|
|
@@ -474,6 +483,7 @@ export { randomPure as random };
|
|
|
474
483
|
* Creates a reusable {@link assert} function.
|
|
475
484
|
*
|
|
476
485
|
* @danger You must configure the generic argument `T`
|
|
486
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
477
487
|
* @returns Nothing until you configure the generic argument `T`
|
|
478
488
|
* @throws compile error
|
|
479
489
|
*
|
|
@@ -484,6 +494,7 @@ declare function createAssert(errorFactory?: undefined | ((props: TypeGuardError
|
|
|
484
494
|
* Creates a reusable {@link assert} function.
|
|
485
495
|
*
|
|
486
496
|
* @template T Type of the input value
|
|
497
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
487
498
|
* @returns A reusable `assert` function
|
|
488
499
|
*
|
|
489
500
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -510,6 +521,7 @@ export { createAssertPure as createAssert };
|
|
|
510
521
|
* > *explicit type annotation.*
|
|
511
522
|
*
|
|
512
523
|
* @danger You must configure the generic argument `T`
|
|
524
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
513
525
|
* @returns Nothing until you configure the generic argument `T`
|
|
514
526
|
* @throws compile error
|
|
515
527
|
*
|
|
@@ -535,6 +547,7 @@ declare function createAssertGuard(errorFactory?: undefined | ((props: TypeGuard
|
|
|
535
547
|
* > *explicit type annotation.*
|
|
536
548
|
*
|
|
537
549
|
* @returns Nothing until you configure the generic argument `T`
|
|
550
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
538
551
|
* @throws compile error
|
|
539
552
|
*
|
|
540
553
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -588,6 +601,7 @@ export { createValidatePure as createValidate };
|
|
|
588
601
|
* Creates a reusable {@link assertEquals} function.
|
|
589
602
|
*
|
|
590
603
|
* @danger You must configure the generic argument `T`
|
|
604
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
591
605
|
* @returns Nothing until you configure the generic argument `T`
|
|
592
606
|
* @throws compile error
|
|
593
607
|
*
|
|
@@ -598,6 +612,7 @@ declare function createAssertEquals(errorFactory?: undefined | ((props: TypeGuar
|
|
|
598
612
|
* Creates a reusable {@link assertEquals} function.
|
|
599
613
|
*
|
|
600
614
|
* @template T Type of the input value
|
|
615
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
601
616
|
* @returns A reusable `assertEquals` function
|
|
602
617
|
*
|
|
603
618
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -624,6 +639,7 @@ export { createAssertEqualsPure as createAssertEquals };
|
|
|
624
639
|
* > *explicit type annotation.*
|
|
625
640
|
*
|
|
626
641
|
* @danger You must configure the generic argument `T`
|
|
642
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
627
643
|
* @returns Nothing until you configure the generic argument `T`
|
|
628
644
|
* @throws compile error
|
|
629
645
|
*
|
|
@@ -648,6 +664,7 @@ declare function createAssertGuardEquals(errorFactory?: undefined | ((props: Typ
|
|
|
648
664
|
* > *Assertions require every name in the call target to be declared with an*
|
|
649
665
|
* > *explicit type annotation.*
|
|
650
666
|
*
|
|
667
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
651
668
|
* @returns Nothing until you configure the generic argument `T`
|
|
652
669
|
* @throws compile error
|
|
653
670
|
*
|
package/lib/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAoD;AAQpD,2DAA2C;AAC3C,+CAA+B;AAC/B,+CAA+B;AAC/B,+CAA+B;AAC/B,yDAAyC;AACzC,uDAAuC;AACvC,qDAAqC;AACrC,+CAA+B;AAE/B,mEAAiD;AACjD,kEAAgD;AAChD,iEAA+C;AAC/C,6DAA2C;AAC3C,mDAAiC;AACjC,qDAAmC;AACnC,gDAA8B;AAC9B,mDAAiC;AAEjC,8CAA4B;AAC5B,6CAA2B;AAC3B,8CAA4B;AAC5B,+CAA6B;AAC7B,8CAA4B;
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAoD;AAQpD,2DAA2C;AAC3C,+CAA+B;AAC/B,+CAA+B;AAC/B,+CAA+B;AAC/B,yDAAyC;AACzC,uDAAuC;AACvC,qDAAqC;AACrC,+CAA+B;AAE/B,mEAAiD;AACjD,kEAAgD;AAChD,iEAA+C;A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M,CAG7D,oBAAoB,EAAE,kBAAkB,CAAC,CAAC;AACP,wDAAoB;AA2BzD;;GAEG;AACH,SAAS,YAAY;IACnB,IAAI,CAAC,cAAc,CAAC,CAAC;AACvB,CAAC;AACD,IAAM,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAGrD,YAAY,EAAE,UAAU,CAAC,CAAC;AACC,wCAAY;AAEzC;;GAEG;AACH,SAAS,IAAI,CAAC,IAAY;IACxB,MAAM,IAAI,KAAK,CACb,yBAAkB,IAAI,8FAA2F,CAClH,CAAC;AACJ,CAAC"}
|
package/lib/notations.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export { camelPure as camel };
|
|
|
33
33
|
*
|
|
34
34
|
* @template T Type of the input value
|
|
35
35
|
* @param input Target object
|
|
36
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
36
37
|
* @returns Camel case object
|
|
37
38
|
*
|
|
38
39
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -46,6 +47,7 @@ declare function assertCamel<T>(input: T, errorFactory?: undefined | ((props: Ty
|
|
|
46
47
|
*
|
|
47
48
|
* @template T Type of the input value
|
|
48
49
|
* @param input Target object
|
|
50
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
49
51
|
* @returns Camel case object
|
|
50
52
|
*
|
|
51
53
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -143,6 +145,7 @@ export { pascalPure as pascal };
|
|
|
143
145
|
*
|
|
144
146
|
* @template T Type of the input value
|
|
145
147
|
* @param input Target object
|
|
148
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
146
149
|
* @returns Pascal case object
|
|
147
150
|
*
|
|
148
151
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -156,6 +159,7 @@ declare function assertPascal<T>(input: T, errorFactory?: undefined | ((props: T
|
|
|
156
159
|
*
|
|
157
160
|
* @template T Type of the input value
|
|
158
161
|
* @param input Target object
|
|
162
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
159
163
|
* @returns Pascal case object
|
|
160
164
|
*
|
|
161
165
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -253,6 +257,7 @@ export { snakePure as snake };
|
|
|
253
257
|
*
|
|
254
258
|
* @template T Type of the input value
|
|
255
259
|
* @param input Target object
|
|
260
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
256
261
|
* @returns Snake case object
|
|
257
262
|
*
|
|
258
263
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -266,6 +271,7 @@ declare function assertSnake<T>(input: T, errorFactory?: undefined | ((props: Ty
|
|
|
266
271
|
*
|
|
267
272
|
* @template T Type of the input value
|
|
268
273
|
* @param input Target object
|
|
274
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
269
275
|
* @returns Snake case object
|
|
270
276
|
*
|
|
271
277
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -358,6 +364,7 @@ export { createCamelPure as createCamel };
|
|
|
358
364
|
* Creates a reusable {@link assertCamel} function.
|
|
359
365
|
*
|
|
360
366
|
* @danger You must configure the generic argument `T`
|
|
367
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
361
368
|
* @returns Nothing until be configure the generic argument `T`
|
|
362
369
|
* @throws compile error
|
|
363
370
|
*
|
|
@@ -368,6 +375,7 @@ declare function createAssertCamel(errorFactory?: undefined | ((props: TypeGuard
|
|
|
368
375
|
* Creates a reusable {@link assertCamel} function.
|
|
369
376
|
*
|
|
370
377
|
* @template T Type of the input value
|
|
378
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
371
379
|
* @returns A reusable `assertCamel` function
|
|
372
380
|
*
|
|
373
381
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -442,6 +450,7 @@ export { createPascalPure as createPascal };
|
|
|
442
450
|
* Creates a reusable {@link assertPascal} function.
|
|
443
451
|
*
|
|
444
452
|
* @danger You must configure the generic argument `T`
|
|
453
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
445
454
|
* @returns Nothing until be configure the generic argument `T`
|
|
446
455
|
* @throws compile error
|
|
447
456
|
*
|
|
@@ -452,6 +461,7 @@ declare function createAssertPascal(errorFactory?: undefined | ((props: TypeGuar
|
|
|
452
461
|
* Creates a reusable {@link assertPascal} function.
|
|
453
462
|
*
|
|
454
463
|
* @template T Type of the input value
|
|
464
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
455
465
|
* @returns A reusable `assertPascal` function
|
|
456
466
|
*
|
|
457
467
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -526,6 +536,7 @@ export { createSnakePure as createSnake };
|
|
|
526
536
|
* Creates a reusable {@link assertSnake} function.
|
|
527
537
|
*
|
|
528
538
|
* @danger You must configure the generic argument `T`
|
|
539
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
529
540
|
* @returns Nothing until be configure the generic argument `T`
|
|
530
541
|
* @throws compile error
|
|
531
542
|
*
|
|
@@ -536,6 +547,7 @@ declare function createAssertSnake(errorFactory?: undefined | ((props: TypeGuard
|
|
|
536
547
|
* Creates a reusable {@link assertSnake} function.
|
|
537
548
|
*
|
|
538
549
|
* @template T Type of the input value
|
|
550
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
539
551
|
* @returns A reusable `assertSnake` function
|
|
540
552
|
*
|
|
541
553
|
* @author Jeongho Nam - https://github.com/samchon
|
package/lib/notations.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notations.js","sourceRoot":"","sources":["../src/notations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAoD;AAsCpD;;GAEG;AACH,SAAS,KAAK;IACZ,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;AACvB,CAAC;AACD,IAAM,SAAS,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAC9C,KAAK;A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