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/lib/protobuf.d.ts CHANGED
@@ -128,6 +128,7 @@ export { decodePure as decode };
128
128
  *
129
129
  * @template T Expected type of decoded value
130
130
  * @param input Protobuf Buffer binary data
131
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
131
132
  * @returns Decoded value
132
133
  *
133
134
  * @author Jeongho Nam - https://github.com/samchon
@@ -156,6 +157,7 @@ declare function assertDecode(input: Uint8Array, errorFactory?: undefined | ((pr
156
157
  *
157
158
  * @template T Expected type of decoded value
158
159
  * @param input Protobuf Buffer binary data
160
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
159
161
  * @returns Decoded value
160
162
  *
161
163
  * @author Jeongho Nam - https://github.com/samchon
@@ -342,6 +344,7 @@ export { encodePure as encode };
342
344
  *
343
345
  * @template T Type of the value input
344
346
  * @param input A value to encode
347
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
345
348
  * @returns Encoded binary data
346
349
  *
347
350
  * @author Jeongho Nam - https://github.com/samchon
@@ -374,6 +377,7 @@ declare function assertEncode<T>(input: T, errorFactory?: undefined | ((props: T
374
377
  *
375
378
  * @template T Type of the value input
376
379
  * @param input A value to encode
380
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
377
381
  * @returns Encoded binary data
378
382
  *
379
383
  * @author Jeongho Nam - https://github.com/samchon
@@ -561,6 +565,7 @@ export { createIsDecodePure as createIsDecode };
561
565
  * Creates a reusable {@link assertDecode} function.
562
566
  *
563
567
  * @danger You must configure the generic argument `T`
568
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
564
569
  * @returns Nothing until you configure the generic argument `T`
565
570
  * @throws compile error
566
571
  *
@@ -571,6 +576,7 @@ declare function createAssertDecode(errorFactory?: undefined | ((props: TypeGuar
571
576
  * Creates a reusable {@link assertDecode} function.
572
577
  *
573
578
  * @template T Target type
579
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
574
580
  * @returns A reusable `assertDecode` function
575
581
  *
576
582
  * @author Jeongho Nam - https://github.com/samchon
@@ -645,6 +651,7 @@ export { createIsEncodePure as createIsEncode };
645
651
  * Creates a reusable {@link assertEncode} function.
646
652
  *
647
653
  * @danger You must configure the generic argument `T`
654
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
648
655
  * @returns Nothing until you configure the generic argument `T`
649
656
  * @throws compile error
650
657
  *
@@ -655,6 +662,7 @@ declare function createAssertEncode(errorFactory?: undefined | ((props: TypeGuar
655
662
  * Creates a reusable {@link assertEncode} function.
656
663
  *
657
664
  * @template T Target type
665
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
658
666
  * @returns A reusable `assertEncode` function
659
667
  *
660
668
  * @author Jeongho Nam - https://github.com/samchon
@@ -1 +1 @@
1
- {"version":3,"file":"protobuf.js","sourceRoot":"","sources":["../src/protobuf.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAoD;AAyDpD;;GAEG;AACH,SAAgB,OAAO;IACrB,IAAI,CAAC,SAAS,CAAC,CAAC;AAClB,CAAC;AAFD,0BAEC;AAmED;;GAEG;AACH,SAAS,MAAM;IACb,IAAI,CAAC,QAAQ,CAAC,CAAC;AACjB,CAAC;AACD,IAAM,UAAU,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAC/C,MAAM;AACN,gBAAgB,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CACrD,CAAC;AACqB,4BAAM;AAoE7B;;GAEG;AACH,SAAS,YAAY;IACnB,IAAI,CAAC,cAAc,CAAC,CAAC;AACvB,CAAC;AAED,IAAM,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAKrD,YAAY;AACZ,gBAAgB,CAAC,SAAS,CAAC,MAAM,CAAC,uBAAuB,CAAC;AAC1D,gBAAgB,CAAC,SAAS,C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B;AAClB,gBAAgB,CAAC,SAAS,CAAC,MAAM,CAAC,6BAA6B,CAAC;AAChE,gBAAgB,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,oBAAoB,CAAC,CACjE,CAAC;AACiC,oDAAkB;AAuBrD;;GAEG;AACH,SAAS,oBAAoB;IAC3B,IAAI,CAAC,sBAAsB,CAAC,CAAC;AAC/B,CAAC;AACD,IAAM,wBAAwB,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAK7D,oBAAoB;AACpB,gBAAgB,CAAC,SAAS,CAAC,QAAQ,EAAE;AACrC,gBAAgB,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,sBAAsB,CAAC,CACnE,CAAC;AACmC,wDAAoB;AAEzD;;GAEG;AACH,SAAS,IAAI,CAAC,IAAY;IACxB,MAAM,IAAI,KAAK,CACb,kCAA2B,IAAI,8FAA2F,CAC3H,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typia",
3
- "version": "5.5.0-dev.20240305",
3
+ "version": "5.5.0",
4
4
  "description": "Superfast runtime validators with only one line",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
package/src/http.ts CHANGED
@@ -67,8 +67,8 @@ export { formDataPure as formData };
67
67
  *
68
68
  * Also, after decoding, `typia.http.assertFormData()` performs type assertion to
69
69
  * the decoded value by combining with {@link assert} function. Therefore, when
70
- * the decoded value is not following the `T` type, {@link TypeGuardError} would
71
- * be thrown.
70
+ * the decoded value is not following the `T` type, {@link TypeGuardError} or
71
+ * custom error generated by *errorFactory* would be thrown.
72
72
  *
73
73
  * By the way, as `FormData` is not enough to express complex data structures,
74
74
  * `typia.http.assertFormData()` function has some limitations. If target type `T`
@@ -81,6 +81,7 @@ export { formDataPure as formData };
81
81
  *
82
82
  * @template T Expected type of decoded value
83
83
  * @param input FormData instance
84
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
84
85
  * @returns Decoded form FormData
85
86
  *
86
87
  * @author Jeongho Nam - https://github.com/samchon
@@ -261,8 +262,8 @@ export { queryPure as query };
261
262
  *
262
263
  * Also, after decoding, `typia.http.assertQuery()` performs type assertion to the
263
264
  * decoded value by combining with {@link assert} function. Therefore, when the
264
- * decoded value is not following the `T` type, {@link TypeGuardError} would be
265
- * thrown.
265
+ * decoded value is not following the `T` type, {@link TypeGuardError} or custom
266
+ * error generated by *errorFactory* would be thrown.
266
267
  *
267
268
  * By the way, as URL query is not enough to express complex data structures,
268
269
  * `typia.http.assertQuery()` function has some limitations. If target type `T` is
@@ -275,6 +276,7 @@ export { queryPure as query };
275
276
  *
276
277
  * @template T Expected type of decoded value
277
278
  * @param input Query string or URLSearchParams instance
279
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
278
280
  * @returns Decoded query object
279
281
  *
280
282
  * @author Jeongho Nam - https://github.com/samchon
@@ -477,8 +479,8 @@ export { headersPure as headers };
477
479
  *
478
480
  * Also, after decoding, `typia.http.assertHeaders()` performs type assertion to the
479
481
  * decoded value by combining with {@link assert} function. Therefore, when the
480
- * decoded value is not following the `T` type, {@link TypeGuardError} would be
481
- * thrown.
482
+ * decoded value is not following the `T` type, {@link TypeGuardError} or custom
483
+ * error generated by *errorFactory* would be thrown.
482
484
  *
483
485
  * By the way, as HTTP headers are not enough to express complex data structures,
484
486
  * `typia.http.headers()` function has some limitations. If target type `T` is not
@@ -513,6 +515,7 @@ export { headersPure as headers };
513
515
  *
514
516
  * @template T Expected type of decoded value
515
517
  * @param input Query string or URLSearchParams instance
518
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
516
519
  * @returns Decoded headers object
517
520
  *
518
521
  * @author Jeongho Nam - https://github.com/samchon
@@ -756,6 +759,7 @@ export { createFormDataPure as createFormData };
756
759
  *
757
760
  * @danger You must configure the generic argument `T`
758
761
  * @template T The type of the formdata object
762
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
759
763
  * @throws compile error
760
764
  *
761
765
  * @author Jeongho Nam - https://github.com/samchon
@@ -768,6 +772,7 @@ function createAssertFormData(
768
772
  * Creates a reusable {@link assertFormData} function.
769
773
  *
770
774
  * @template T The type of the formdata object
775
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
771
776
  * @returns A reusable `assertFormData` function
772
777
  *
773
778
  * @author Jeongho Nam - https://github.com/samchon
@@ -917,6 +922,7 @@ export { createQueryPure as createQuery };
917
922
  *
918
923
  * @danger You must configure the generic argument `T`
919
924
  * @template T The type of the query object
925
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
920
926
  * @throws compile error
921
927
  *
922
928
  * @author Jeongho Nam - https://github.com/samchon
@@ -929,6 +935,7 @@ function createAssertQuery(
929
935
  * Creates a reusable {@link assertQuery} function.
930
936
  *
931
937
  * @template T The type of the query object
938
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
932
939
  * @returns A reusable `assertQuery` function
933
940
  *
934
941
  * @author Jeongho Nam - https://github.com/samchon
@@ -1082,6 +1089,7 @@ export { createHeadersPure as createHeaders };
1082
1089
  *
1083
1090
  * @danger You must configure the generic argument `T`
1084
1091
  * @template T The type of the headers object
1092
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
1085
1093
  * @throws compile error
1086
1094
  *
1087
1095
  * @author Jeongho Nam - https://github.com/samchon
@@ -1094,6 +1102,7 @@ function createAssertHeaders(
1094
1102
  * Creates a reusable {@link assertHeaders} function.
1095
1103
  *
1096
1104
  * @template T The type of the headers object
1105
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
1097
1106
  * @returns A reusable `assertHeaders` function
1098
1107
  *
1099
1108
  * @author Jeongho Nam - https://github.com/samchon
package/src/json.ts CHANGED
@@ -95,11 +95,12 @@ export function application(): never {
95
95
  * to a `T` typed instance with type assertion.
96
96
  *
97
97
  * In such reason, when parsed JSON string value is not matched with the type `T`, it
98
- * throws {@link TypeGuardError}. Otherwise, there's no problem on the parsed value,
99
- * the parsed value would be returned.
98
+ * throws {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
99
+ * there's no problem on the parsed value, the parsed value would be returned.
100
100
  *
101
101
  * @template T Expected type of parsed value
102
102
  * @param input JSON string
103
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
103
104
  * @returns Parsed value
104
105
  *
105
106
  * @author Jeongho Nam - https://github.com/samchon
@@ -117,11 +118,13 @@ function assertParse(
117
118
  * to a `T` typed instance with type assertion.
118
119
  *
119
120
  * In such reason, when parsed JSON string value is not matched with the type `T`,
120
- * it throws {@link TypeGuardError}. Otherwise, there's no problem on the parsed
121
- * value, the parsed value would be returned.
121
+ * it throws {@link TypeGuardError} or custom error generated by *errorFactory*.
122
+ * Otherwise, there's no problem on the parsed value, the parsed value would be
123
+ * returned.
122
124
  *
123
125
  * @template T Expected type of parsed value
124
126
  * @param input JSON string
127
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
125
128
  * @returns Parsed value
126
129
  *
127
130
  * @author Jeongho Nam - https://github.com/samchon
@@ -296,8 +299,8 @@ export { stringifyPure as stringify };
296
299
  * JSON (JavaScript Object Notation) string, with type assertion.
297
300
  *
298
301
  * In such reason, when `input` value is not matched with the type `T`, it throws an
299
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, JSON
300
- * string would be returned.
302
+ * {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
303
+ * there's no problem on the `input` value, JSON string would be returned.
301
304
  *
302
305
  * For reference, with type assertion, it is even 5x times faster than the native
303
306
  * `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
@@ -305,6 +308,7 @@ export { stringifyPure as stringify };
305
308
  *
306
309
  * @template T Type of the input value
307
310
  * @param input A value to be asserted and converted
311
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
308
312
  * @return JSON string value
309
313
  *
310
314
  * @author Jeongho Nam - https://github.com/samchon
@@ -322,8 +326,8 @@ function assertStringify<T>(
322
326
  * JSON (JavaScript Object Notation) string, with type assertion.
323
327
  *
324
328
  * In such reason, when `input` value is not matched with the type `T`, it throws an
325
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, JSON
326
- * string would be returned.
329
+ * {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
330
+ * there's no problem on the `input` value, JSON string would be returned.
327
331
  *
328
332
  * For reference, with type assertion, it is even 5x times faster than the native
329
333
  * `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
@@ -331,6 +335,7 @@ function assertStringify<T>(
331
335
  *
332
336
  * @template T Type of the input value
333
337
  * @param input A value to be asserted and converted
338
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
334
339
  * @return JSON string value
335
340
  *
336
341
  * @author Jeongho Nam - https://github.com/samchon
@@ -527,6 +532,7 @@ export { createIsParsePure as createIsParse };
527
532
  *
528
533
  * @danger You must configure the generic argument `T`
529
534
  * @returns Nothing until you configure the generic argument `T`
535
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
530
536
  * @throws compile error
531
537
  *
532
538
  * @author Jeongho Nam - https://github.com/samchon
@@ -539,6 +545,7 @@ function createAssertParse(
539
545
  * Creates a reusable {@link assertParse} function.
540
546
  *
541
547
  * @template T Expected type of parsed value
548
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
542
549
  * @returns A reusable `assertParse` function
543
550
  *
544
551
  * @author Jeongho Nam - https://github.com/samchon
@@ -633,6 +640,7 @@ export { createStringifyPure as createStringify };
633
640
  * Creates a reusable {@link assertStringify} function.
634
641
  *
635
642
  * @danger You must configure the generic argument `T`
643
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
636
644
  * @returns Nothing until you configure the generic argument `T`
637
645
  * @throws compile error
638
646
  *
@@ -646,6 +654,7 @@ function createAssertStringify(
646
654
  * Creates a reusable {@link assertStringify} function.
647
655
  *
648
656
  * @template T Type of the input value
657
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
649
658
  * @returns A reusable `assertStringify` function
650
659
  *
651
660
  * @author Jeongho Nam - https://github.com/samchon
package/src/misc.ts CHANGED
@@ -99,11 +99,12 @@ export { clonePure as clone };
99
99
  * methods would not be cloned.
100
100
  *
101
101
  * In such reason, when `input` value is not matched with the type `T`, it throws an
102
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, cloned
103
- * data would be returned.
102
+ * {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
103
+ * there's no problem on the `input` value, cloned data would be returned.
104
104
  *
105
105
  * @template T Type of the input value
106
106
  * @param input A value to be cloned
107
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
107
108
  * @return Cloned data
108
109
  *
109
110
  * @author Jeongho Nam - https://github.com/samchon
@@ -121,11 +122,12 @@ function assertClone<T>(
121
122
  * methods would not be cloned.
122
123
  *
123
124
  * In such reason, when `input` value is not matched with the type `T`, it throws an
124
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, cloned
125
- * data would be returned.
125
+ * {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
126
+ * there's no problem on the `input` value, cloned data would be returned.
126
127
  *
127
128
  * @template T Type of the input value
128
129
  * @param input A value to be cloned
130
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
129
131
  * @return Cloned data
130
132
  *
131
133
  * @author Jeongho Nam - https://github.com/samchon
@@ -302,11 +304,13 @@ export { prunePure as prune };
302
304
  * object including nested objects, with type assertion.
303
305
  *
304
306
  * In such reason, when `input` value is not matched with the type `T`, it throws an
305
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, its
306
- * every superfluous properties would be removed, including nested objects.
307
+ * {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
308
+ * there's no problem on the `input` value, its every superfluous properties would be
309
+ * removed, including nested objects.
307
310
  *
308
311
  * @template T Type of the input value
309
312
  * @param input Target instance to assert and prune
313
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
310
314
  *
311
315
  * @author Jeongho Nam - https://github.com/samchon
312
316
  */
@@ -323,11 +327,13 @@ function assertPrune<T>(
323
327
  * object including nested objects, with type assertion.
324
328
  *
325
329
  * In such reason, when `input` value is not matched with the type `T`, it throws an
326
- * {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, its
327
- * every superfluous properties would be removed, including nested objects.
330
+ * {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise, there's
331
+ * no problem on the `input` value, its every superfluous properties would be removed,
332
+ * including nested objects.
328
333
  *
329
334
  * @template T Type of the input value
330
335
  * @param input Target instance to assert and prune
336
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
331
337
  *
332
338
  * @author Jeongho Nam - https://github.com/samchon
333
339
  */
@@ -502,6 +508,7 @@ export { createClonePure as createClone };
502
508
  * Creates a reusable {@link assertClone} function.
503
509
  *
504
510
  * @danger You must configure the generic argument `T`
511
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
505
512
  * @returns Nothing until you configure the generic argument `T`
506
513
  * @throws compile error
507
514
  *
@@ -515,6 +522,7 @@ function createAssertClone(
515
522
  * Creates a resuable {@link assertClone} function.
516
523
  *
517
524
  * @template T Type of the input value
525
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
518
526
  * @returns A reusable `clone` function
519
527
  *
520
528
  * @author Jeongho Nam - https://github.com/samchon
@@ -638,6 +646,7 @@ export { createPrunePure as createPrune };
638
646
  * Creates a reusable {@link assertPrune} function.
639
647
  *
640
648
  * @danger You must configure the generic argument `T`
649
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
641
650
  * @returns Nothing until you configure the generic argument `T`
642
651
  * @throws compile error
643
652
  *
@@ -651,6 +660,7 @@ function createAssertPrune(
651
660
  * Creates a resuable {@link assertPrune} function.
652
661
  *
653
662
  * @template T Type of the input value
663
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
654
664
  * @returns A reusable `isPrune` function
655
665
  *
656
666
  * @author Jeongho Nam - https://github.com/samchon
package/src/module.ts CHANGED
@@ -51,6 +51,7 @@ export * from "./SnakeCase";
51
51
  *
52
52
  * @template T Type of the input value
53
53
  * @param input A value to be asserted
54
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
54
55
  * @returns Parametric input value
55
56
  * @throws A {@link TypeGuardError} instance with detailed reason
56
57
  *
@@ -77,6 +78,7 @@ function assert<T>(
77
78
  *
78
79
  * @template T Type of the input value
79
80
  * @param input A value to be asserted
81
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
80
82
  * @returns Parametric input value casted as `T`
81
83
  * @throws A {@link TypeGuardError} instance with detailed reason
82
84
  *
@@ -119,6 +121,7 @@ export { assertPure as assert };
119
121
  *
120
122
  * @template T Type of the input value
121
123
  * @param input A value to be asserted
124
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
122
125
  * @throws A {@link TypeGuardError} instance with detailed reason
123
126
  *
124
127
  * @author Jeongho Nam - https://github.com/samchon
@@ -148,6 +151,7 @@ function assertGuard<T>(
148
151
  *
149
152
  * @template T Type of the input value
150
153
  * @param input A value to be asserted
154
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
151
155
  * @throws A {@link TypeGuardError} instance with detailed reason
152
156
  *
153
157
  * @author Jeongho Nam - https://github.com/samchon
@@ -187,6 +191,7 @@ export { assertGuardPure as assertGuard };
187
191
  *
188
192
  * @template T Type of the input value
189
193
  * @param input A value to be tested
194
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
190
195
  * @returns Whether the parametric value is following the type `T` or not
191
196
  *
192
197
  * @author Jeongho Nam - https://github.com/samchon
@@ -312,6 +317,7 @@ export { validatePure as validate };
312
317
  *
313
318
  * @template T Type of the input value
314
319
  * @param input A value to be asserted
320
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
315
321
  * @returns Parametric input value
316
322
  * @throws A {@link TypeGuardError} instance with detailed reason
317
323
  *
@@ -340,6 +346,7 @@ function assertEquals<T>(
340
346
  *
341
347
  * @template T Type of the input value
342
348
  * @param input A value to be asserted
349
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
343
350
  * @returns Parametric input value casted as `T`
344
351
  * @throws A {@link TypeGuardError} instance with detailed reason
345
352
  *
@@ -384,6 +391,7 @@ export { assertEqualsPure as assertEquals };
384
391
  *
385
392
  * @template T Type of the input value
386
393
  * @param input A value to be asserted
394
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
387
395
  * @returns Parametric input value casted as `T`
388
396
  * @throws A {@link TypeGuardError} instance with detailed reason
389
397
  *
@@ -416,6 +424,7 @@ function assertGuardEquals<T>(
416
424
  *
417
425
  * @template T Type of the input value
418
426
  * @param input A value to be asserted
427
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
419
428
  * @returns Parametric input value casted as `T`
420
429
  * @throws A {@link TypeGuardError} instance with detailed reason
421
430
  *
@@ -624,6 +633,7 @@ export { randomPure as random };
624
633
  * Creates a reusable {@link assert} function.
625
634
  *
626
635
  * @danger You must configure the generic argument `T`
636
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
627
637
  * @returns Nothing until you configure the generic argument `T`
628
638
  * @throws compile error
629
639
  *
@@ -637,6 +647,7 @@ function createAssert(
637
647
  * Creates a reusable {@link assert} function.
638
648
  *
639
649
  * @template T Type of the input value
650
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
640
651
  * @returns A reusable `assert` function
641
652
  *
642
653
  * @author Jeongho Nam - https://github.com/samchon
@@ -676,6 +687,7 @@ export { createAssertPure as createAssert };
676
687
  * > *explicit type annotation.*
677
688
  *
678
689
  * @danger You must configure the generic argument `T`
690
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
679
691
  * @returns Nothing until you configure the generic argument `T`
680
692
  * @throws compile error
681
693
  *
@@ -704,6 +716,7 @@ function createAssertGuard(
704
716
  * > *explicit type annotation.*
705
717
  *
706
718
  * @returns Nothing until you configure the generic argument `T`
719
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
707
720
  * @throws compile error
708
721
  *
709
722
  * @author Jeongho Nam - https://github.com/samchon
@@ -794,6 +807,7 @@ export { createValidatePure as createValidate };
794
807
  * Creates a reusable {@link assertEquals} function.
795
808
  *
796
809
  * @danger You must configure the generic argument `T`
810
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
797
811
  * @returns Nothing until you configure the generic argument `T`
798
812
  * @throws compile error
799
813
  *
@@ -807,6 +821,7 @@ function createAssertEquals(
807
821
  * Creates a reusable {@link assertEquals} function.
808
822
  *
809
823
  * @template T Type of the input value
824
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
810
825
  * @returns A reusable `assertEquals` function
811
826
  *
812
827
  * @author Jeongho Nam - https://github.com/samchon
@@ -846,6 +861,7 @@ export { createAssertEqualsPure as createAssertEquals };
846
861
  * > *explicit type annotation.*
847
862
  *
848
863
  * @danger You must configure the generic argument `T`
864
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
849
865
  * @returns Nothing until you configure the generic argument `T`
850
866
  * @throws compile error
851
867
  *
@@ -873,6 +889,7 @@ function createAssertGuardEquals(
873
889
  * > *Assertions require every name in the call target to be declared with an*
874
890
  * > *explicit type annotation.*
875
891
  *
892
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
876
893
  * @returns Nothing until you configure the generic argument `T`
877
894
  * @throws compile error
878
895
  *
package/src/notations.ts CHANGED
@@ -56,6 +56,7 @@ export { camelPure as camel };
56
56
  *
57
57
  * @template T Type of the input value
58
58
  * @param input Target object
59
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
59
60
  * @returns Camel case object
60
61
  *
61
62
  * @author Jeongho Nam - https://github.com/samchon
@@ -73,6 +74,7 @@ function assertCamel<T>(
73
74
  *
74
75
  * @template T Type of the input value
75
76
  * @param input Target object
77
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
76
78
  * @returns Camel case object
77
79
  *
78
80
  * @author Jeongho Nam - https://github.com/samchon
@@ -233,6 +235,7 @@ export { pascalPure as pascal };
233
235
  *
234
236
  * @template T Type of the input value
235
237
  * @param input Target object
238
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
236
239
  * @returns Pascal case object
237
240
  *
238
241
  * @author Jeongho Nam - https://github.com/samchon
@@ -250,6 +253,7 @@ function assertPascal<T>(
250
253
  *
251
254
  * @template T Type of the input value
252
255
  * @param input Target object
256
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
253
257
  * @returns Pascal case object
254
258
  *
255
259
  * @author Jeongho Nam - https://github.com/samchon
@@ -410,6 +414,7 @@ export { snakePure as snake };
410
414
  *
411
415
  * @template T Type of the input value
412
416
  * @param input Target object
417
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
413
418
  * @returns Snake case object
414
419
  *
415
420
  * @author Jeongho Nam - https://github.com/samchon
@@ -427,6 +432,7 @@ function assertSnake<T>(
427
432
  *
428
433
  * @template T Type of the input value
429
434
  * @param input Target object
435
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
430
436
  * @returns Snake case object
431
437
  *
432
438
  * @author Jeongho Nam - https://github.com/samchon
@@ -582,6 +588,7 @@ export { createCamelPure as createCamel };
582
588
  * Creates a reusable {@link assertCamel} function.
583
589
  *
584
590
  * @danger You must configure the generic argument `T`
591
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
585
592
  * @returns Nothing until be configure the generic argument `T`
586
593
  * @throws compile error
587
594
  *
@@ -595,6 +602,7 @@ function createAssertCamel(
595
602
  * Creates a reusable {@link assertCamel} function.
596
603
  *
597
604
  * @template T Type of the input value
605
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
598
606
  * @returns A reusable `assertCamel` function
599
607
  *
600
608
  * @author Jeongho Nam - https://github.com/samchon
@@ -733,6 +741,7 @@ export { createPascalPure as createPascal };
733
741
  * Creates a reusable {@link assertPascal} function.
734
742
  *
735
743
  * @danger You must configure the generic argument `T`
744
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
736
745
  * @returns Nothing until be configure the generic argument `T`
737
746
  * @throws compile error
738
747
  *
@@ -746,6 +755,7 @@ function createAssertPascal(
746
755
  * Creates a reusable {@link assertPascal} function.
747
756
  *
748
757
  * @template T Type of the input value
758
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
749
759
  * @returns A reusable `assertPascal` function
750
760
  *
751
761
  * @author Jeongho Nam - https://github.com/samchon
@@ -884,6 +894,7 @@ export { createSnakePure as createSnake };
884
894
  * Creates a reusable {@link assertSnake} function.
885
895
  *
886
896
  * @danger You must configure the generic argument `T`
897
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
887
898
  * @returns Nothing until be configure the generic argument `T`
888
899
  * @throws compile error
889
900
  *
@@ -897,6 +908,7 @@ function createAssertSnake(
897
908
  * Creates a reusable {@link assertSnake} function.
898
909
  *
899
910
  * @template T Type of the input value
911
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
900
912
  * @returns A reusable `assertSnake` function
901
913
  *
902
914
  * @author Jeongho Nam - https://github.com/samchon
package/src/protobuf.ts CHANGED
@@ -164,6 +164,7 @@ export { decodePure as decode };
164
164
  *
165
165
  * @template T Expected type of decoded value
166
166
  * @param input Protobuf Buffer binary data
167
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
167
168
  * @returns Decoded value
168
169
  *
169
170
  * @author Jeongho Nam - https://github.com/samchon
@@ -196,6 +197,7 @@ function assertDecode(
196
197
  *
197
198
  * @template T Expected type of decoded value
198
199
  * @param input Protobuf Buffer binary data
200
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
199
201
  * @returns Decoded value
200
202
  *
201
203
  * @author Jeongho Nam - https://github.com/samchon
@@ -446,6 +448,7 @@ export { encodePure as encode };
446
448
  *
447
449
  * @template T Type of the value input
448
450
  * @param input A value to encode
451
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
449
452
  * @returns Encoded binary data
450
453
  *
451
454
  * @author Jeongho Nam - https://github.com/samchon
@@ -482,6 +485,7 @@ function assertEncode<T>(
482
485
  *
483
486
  * @template T Type of the value input
484
487
  * @param input A value to encode
488
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
485
489
  * @returns Encoded binary data
486
490
  *
487
491
  * @author Jeongho Nam - https://github.com/samchon
@@ -750,6 +754,7 @@ export { createIsDecodePure as createIsDecode };
750
754
  * Creates a reusable {@link assertDecode} function.
751
755
  *
752
756
  * @danger You must configure the generic argument `T`
757
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
753
758
  * @returns Nothing until you configure the generic argument `T`
754
759
  * @throws compile error
755
760
  *
@@ -763,6 +768,7 @@ function createAssertDecode(
763
768
  * Creates a reusable {@link assertDecode} function.
764
769
  *
765
770
  * @template T Target type
771
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
766
772
  * @returns A reusable `assertDecode` function
767
773
  *
768
774
  * @author Jeongho Nam - https://github.com/samchon
@@ -905,6 +911,7 @@ export { createIsEncodePure as createIsEncode };
905
911
  * Creates a reusable {@link assertEncode} function.
906
912
  *
907
913
  * @danger You must configure the generic argument `T`
914
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
908
915
  * @returns Nothing until you configure the generic argument `T`
909
916
  * @throws compile error
910
917
  *
@@ -918,6 +925,7 @@ function createAssertEncode(
918
925
  * Creates a reusable {@link assertEncode} function.
919
926
  *
920
927
  * @template T Target type
928
+ * @param errorFactory Custom error factory. Default is `TypeGuardError`
921
929
  * @returns A reusable `assertEncode` function
922
930
  *
923
931
  * @author Jeongho Nam - https://github.com/samchon