typia 13.2.0 → 13.3.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.
Files changed (92) hide show
  1. package/lib/http.d.ts +3 -3
  2. package/lib/http.js.map +1 -1
  3. package/lib/http.mjs.map +1 -1
  4. package/lib/internal/_assertGuard.js +13 -3
  5. package/lib/internal/_assertGuard.js.map +1 -1
  6. package/lib/internal/_assertGuard.mjs +4 -2
  7. package/lib/internal/_assertGuard.mjs.map +1 -1
  8. package/lib/internal/_isFormatIdnHostname.js +5 -1
  9. package/lib/internal/_isFormatIdnHostname.js.map +1 -1
  10. package/lib/internal/_isFormatIdnHostname.mjs +1 -1
  11. package/lib/internal/_isFormatIdnHostname.mjs.map +1 -1
  12. package/lib/internal/_isFormatTime.js +19 -2
  13. package/lib/internal/_isFormatTime.js.map +1 -1
  14. package/lib/internal/_isFormatTime.mjs +9 -2
  15. package/lib/internal/_isFormatTime.mjs.map +1 -1
  16. package/lib/internal/_randomArray.js +37 -4
  17. package/lib/internal/_randomArray.js.map +1 -1
  18. package/lib/internal/_randomArray.mjs +16 -3
  19. package/lib/internal/_randomArray.mjs.map +1 -1
  20. package/lib/internal/_randomFormatByte.js +15 -12
  21. package/lib/internal/_randomFormatByte.js.map +1 -1
  22. package/lib/internal/_randomFormatByte.mjs +11 -10
  23. package/lib/internal/_randomFormatByte.mjs.map +1 -1
  24. package/lib/internal/_randomFormatDatetime.mjs +1 -1
  25. package/lib/internal/_randomFormatHostname.d.ts +2 -2
  26. package/lib/internal/_randomFormatHostname.js +2 -2
  27. package/lib/internal/_randomFormatHostname.mjs +2 -2
  28. package/lib/internal/_randomFormatHostname.mjs.map +1 -1
  29. package/lib/internal/_randomFormatIdnHostname.js +9 -10
  30. package/lib/internal/_randomFormatIdnHostname.js.map +1 -1
  31. package/lib/internal/_randomFormatIdnHostname.mjs +3 -4
  32. package/lib/internal/_randomFormatIdnHostname.mjs.map +1 -1
  33. package/lib/internal/_randomFormatRegex.js +4 -4
  34. package/lib/internal/_randomFormatRegex.js.map +1 -1
  35. package/lib/internal/_randomFormatRegex.mjs +1 -2
  36. package/lib/internal/_randomFormatRegex.mjs.map +1 -1
  37. package/lib/internal/_randomFormatTime.js +15 -10
  38. package/lib/internal/_randomFormatTime.js.map +1 -1
  39. package/lib/internal/_randomFormatTime.mjs +6 -3
  40. package/lib/internal/_randomFormatTime.mjs.map +1 -1
  41. package/lib/internal/private/__randomComposition.d.ts +8 -0
  42. package/lib/internal/private/__randomComposition.js +21 -1
  43. package/lib/internal/private/__randomComposition.js.map +1 -1
  44. package/lib/internal/private/__randomComposition.mjs +18 -1
  45. package/lib/internal/private/__randomComposition.mjs.map +1 -1
  46. package/lib/json.d.ts +2 -2
  47. package/lib/json.js.map +1 -1
  48. package/lib/json.mjs.map +1 -1
  49. package/lib/module.d.ts +28 -13
  50. package/lib/module.js.map +1 -1
  51. package/lib/module.mjs.map +1 -1
  52. package/lib/notations.d.ts +4 -4
  53. package/lib/notations.js.map +1 -1
  54. package/lib/notations.mjs.map +1 -1
  55. package/lib/plain.d.ts +3 -3
  56. package/lib/plain.js.map +1 -1
  57. package/lib/plain.mjs.map +1 -1
  58. package/lib/protobuf.d.ts +2 -2
  59. package/lib/protobuf.js.map +1 -1
  60. package/lib/protobuf.mjs.map +1 -1
  61. package/native/cmd/ttsc-typia/assert_guard_factory_contract_test.go +17 -4
  62. package/native/cmd/ttsc-typia/create_assert_error_factory_arity_test.go +309 -0
  63. package/native/cmd/ttsc-typia/local_function_named_like_typia_operation_transform_test.go +185 -0
  64. package/native/cmd/ttsc-typia/recursive_conditional_alias_name_transform_test.go +307 -0
  65. package/native/cmd/ttsc-typia/shadowed_typia_module_declaration_diagnostic_test.go +152 -0
  66. package/native/cmd/ttsc-typia/template_literal_type_tags_transform_test.go +1 -3
  67. package/native/cmd/ttsc-typia/transform_helpers_test.go +92 -26
  68. package/native/core/factories/FormatCheatSheet.go +2 -2
  69. package/native/core/factories/MetadataCommentTagFactory.go +26 -11
  70. package/native/core/factories/factory_utility_coverage_test.go +896 -907
  71. package/native/core/factories/internal/metadata/MetadataHelper.go +5 -28
  72. package/native/core/factories/metadata_comment_tag_factory_coverage_test.go +2 -2
  73. package/native/core/programmers/RandomProgrammer.go +5 -2
  74. package/native/core/schemas/metadata/MetadataCollection.go +47 -5
  75. package/native/transform/CallExpressionTransformer.go +167 -0
  76. package/package.json +3 -3
  77. package/src/http.ts +18 -4
  78. package/src/internal/_assertGuard.ts +13 -2
  79. package/src/internal/_isFormatIdnHostname.ts +5 -1
  80. package/src/internal/_isFormatTime.ts +19 -2
  81. package/src/internal/_randomArray.ts +42 -6
  82. package/src/internal/_randomFormatByte.ts +17 -12
  83. package/src/internal/_randomFormatHostname.ts +2 -2
  84. package/src/internal/_randomFormatIdnHostname.ts +8 -9
  85. package/src/internal/_randomFormatRegex.ts +4 -6
  86. package/src/internal/_randomFormatTime.ts +15 -10
  87. package/src/internal/private/__randomComposition.ts +24 -0
  88. package/src/json.ts +16 -4
  89. package/src/module.ts +56 -22
  90. package/src/notations.ts +16 -4
  91. package/src/plain.ts +12 -3
  92. package/src/protobuf.ts +16 -4
@@ -15,12 +15,11 @@ export const _randomFormatTime = (props?: _ILengthProps): string => {
15
15
  if (props?.minLength === undefined && props?.maxLength === undefined)
16
16
  return clock().substring(11);
17
17
  // `HH:MM:SS` carries a mandatory offset — one character as `Z`, six as
18
- // `+HH:MM` — and an optional fraction of one to nine digits between them.
19
- // Together they express 9 and every length from 11 through 24; 10 is the one
20
- // gap, because a fraction needs both a dot and a digit.
18
+ // `+HH:MM` — and an optional fraction between them that RFC 3339 leaves
19
+ // open above. Together they express 9 and every length from 11 upward; 10 is
20
+ // the one gap, because a fraction needs both a dot and a digit.
21
21
  const window = _randomLengthWindow(props, {
22
22
  minimum: CLOCK + 1,
23
- maximum: CLOCK + 1 + FRACTION_MAX + OFFSET,
24
23
  spread: 6,
25
24
  });
26
25
  let length: number = _randomLengthPick(window);
@@ -30,17 +29,23 @@ export const _randomFormatTime = (props?: _ILengthProps): string => {
30
29
  throw new Error(_RANDOM_LENGTH_ERROR);
31
30
  const base: string = clock().substring(11, 11 + CLOCK);
32
31
  if (length === CLOCK + 1) return `${base}Z`;
33
- // Nine fraction digits cap the `Z` form at 19 characters, so anything longer
34
- // spends the extra five on a numeric offset instead.
35
- return length <= CLOCK + 2 + FRACTION_MAX
36
- ? `${base}.${__randomDigits(length - CLOCK - 2)}Z`
37
- : `${base}.${__randomDigits(length - CLOCK - 1 - OFFSET)}${offset()}`;
32
+ // The `Z` form reaches every remaining length by itself, so the numeric
33
+ // offset is a choice rather than a fallback: it spends six characters, which
34
+ // leaves either nothing (14, `HH:MM:SS+HH:MM`) or a whole fraction (16 and
35
+ // up). At 15 only the `Z` form fits, since the offset would demand a dot
36
+ // with no digit after it.
37
+ const fraction: number = length - CLOCK - OFFSET - 1;
38
+ return (fraction === -1 || fraction >= 1) &&
39
+ _randomInteger({ type: "integer", minimum: 0, maximum: 1 }) === 1
40
+ ? fraction === -1
41
+ ? `${base}${offset()}`
42
+ : `${base}.${__randomDigits(fraction)}${offset()}`
43
+ : `${base}.${__randomDigits(length - CLOCK - 2)}Z`;
38
44
  };
39
45
 
40
46
  const DAY = 86_400_000;
41
47
  const CLOCK = "00:00:00".length;
42
48
  const OFFSET = "+00:00".length;
43
- const FRACTION_MAX = 9;
44
49
 
45
50
  const offset = (): string =>
46
51
  `${_randomInteger({ type: "integer", minimum: 0, maximum: 1 }) === 0 ? "+" : "-"}${pad(
@@ -34,6 +34,30 @@ export const __randomComposition = (props: {
34
34
  return parts;
35
35
  };
36
36
 
37
+ /**
38
+ * Draws `length` characters of the base64 alphabet.
39
+ *
40
+ * The caller passes a multiple of four, which `format: "byte"` accepts without
41
+ * padding; every character below is in the alphabet its validator spells out,
42
+ * so the result needs no encoding step.
43
+ */
44
+ export const __randomBase64 = (length: number): string => {
45
+ let text: string = "";
46
+ for (let i: number = 0; i < length; ++i)
47
+ text +=
48
+ BASE64[
49
+ _randomInteger({
50
+ type: "integer",
51
+ minimum: 0,
52
+ maximum: BASE64.length - 1,
53
+ })
54
+ ];
55
+ return text;
56
+ };
57
+
58
+ const BASE64 =
59
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
60
+
37
61
  /** Draws `length` decimal digits, leading zeros included. */
38
62
  export const __randomDigits = (length: number): string => {
39
63
  let text: string = "";
package/src/json.ts CHANGED
@@ -431,10 +431,16 @@ export function createAssertParse(
431
431
  */
432
432
  export function createAssertParse<T>(
433
433
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
434
- ): (input: string) => Primitive<T>;
434
+ ): (
435
+ input: string,
436
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
437
+ ) => Primitive<T>;
435
438
 
436
439
  /** @internal */
437
- export function createAssertParse<T>(): (input: string) => Primitive<T> {
440
+ export function createAssertParse<T>(): (
441
+ input: string,
442
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
443
+ ) => Primitive<T> {
438
444
  NoTransformConfigurationError("json.createAssertParse");
439
445
  }
440
446
 
@@ -501,10 +507,16 @@ export function createAssertStringify(
501
507
  */
502
508
  export function createAssertStringify<T>(
503
509
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
504
- ): (input: unknown) => string;
510
+ ): (
511
+ input: unknown,
512
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
513
+ ) => string;
505
514
 
506
515
  /** @internal */
507
- export function createAssertStringify(): (input: unknown) => string {
516
+ export function createAssertStringify(): (
517
+ input: unknown,
518
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
519
+ ) => string {
508
520
  NoTransformConfigurationError("json.createAssertStringify");
509
521
  }
510
522
 
package/src/module.ts CHANGED
@@ -1,10 +1,5 @@
1
1
  import { StandardSchemaV1 } from "@standard-schema/spec";
2
- import {
3
- AssertionGuard,
4
- IRandomGenerator,
5
- IValidation,
6
- Resolved,
7
- } from "@typia/interface";
2
+ import { IRandomGenerator, IValidation, Resolved } from "@typia/interface";
8
3
 
9
4
  import { TypeGuardError } from "./TypeGuardError";
10
5
  import { NoTransformConfigurationError } from "./transformers/NoTransformConfigurationError";
@@ -577,7 +572,7 @@ export function random(): never {
577
572
  * @template T Target type to validate against
578
573
  * @param errorFactory Custom error factory receiving
579
574
  * {@link TypeGuardError.IProps}
580
- * @returns Reusable assert function `(input: unknown) => T`
575
+ * @returns Reusable assert function `(input: unknown, errorFactory?) => T`
581
576
  * @danger You must configure the generic argument `T`
582
577
  */
583
578
  export function createAssert(
@@ -593,14 +588,21 @@ export function createAssert(
593
588
  * @template T Target type to validate against
594
589
  * @param errorFactory Custom error factory receiving
595
590
  * {@link TypeGuardError.IProps}
596
- * @returns Reusable assert function `(input: unknown) => T`
591
+ * @returns Reusable assert function `(input: unknown, errorFactory?) => T`,
592
+ * whose own `errorFactory` overrides this one for that single call
597
593
  */
598
594
  export function createAssert<T>(
599
595
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
600
- ): (input: unknown) => T;
596
+ ): (
597
+ input: unknown,
598
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
599
+ ) => T;
601
600
 
602
601
  /** @internal */
603
- export function createAssert<T>(): (input: unknown) => T {
602
+ export function createAssert<T>(): (
603
+ input: unknown,
604
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
605
+ ) => T {
604
606
  NoTransformConfigurationError("createAssert");
605
607
  }
606
608
 
@@ -611,6 +613,9 @@ export function createAssert<T>(): (input: unknown) => T {
611
613
  *
612
614
  * TypeScript requirement: You must declare the variable type explicitly. `const
613
615
  * fn: AssertionGuard<T> = createAssertGuard<T>()` — otherwise compile error.
616
+ * That annotation is one parameter wide, so it also hides the call-time
617
+ * `errorFactory`; annotate with `(input: unknown, errorFactory?: (props:
618
+ * TypeGuardError.IProps) => Error) => asserts input is T` when you need it.
614
619
  *
615
620
  * @template T Target type to validate against
616
621
  * @param errorFactory Custom error factory receiving
@@ -629,18 +634,28 @@ export function createAssertGuard(
629
634
  *
630
635
  * TypeScript requirement: You must declare the variable type explicitly. `const
631
636
  * fn: AssertionGuard<T> = createAssertGuard<T>()` — otherwise compile error.
637
+ * That annotation is one parameter wide, so it also hides the call-time
638
+ * `errorFactory`; annotate with `(input: unknown, errorFactory?: (props:
639
+ * TypeGuardError.IProps) => Error) => asserts input is T` when you need it.
632
640
  *
633
641
  * @template T Target type to validate against
634
642
  * @param errorFactory Custom error factory receiving
635
643
  * {@link TypeGuardError.IProps}
636
- * @returns Reusable assertion guard function
644
+ * @returns Reusable assertion guard function, whose own `errorFactory`
645
+ * overrides this one for that single call
637
646
  */
638
647
  export function createAssertGuard<T>(
639
648
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
640
- ): AssertionGuard<T>;
649
+ ): (
650
+ input: unknown,
651
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
652
+ ) => asserts input is T;
641
653
 
642
654
  /** @internal */
643
- export function createAssertGuard<T>(): AssertionGuard<T> {
655
+ export function createAssertGuard<T>(): (
656
+ input: unknown,
657
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
658
+ ) => asserts input is T {
644
659
  NoTransformConfigurationError("createAssertGuard");
645
660
  }
646
661
 
@@ -747,7 +762,8 @@ export function createValidate(): ((input: unknown) => IValidation) &
747
762
  * @template T Target type for exact match
748
763
  * @param errorFactory Custom error factory receiving
749
764
  * {@link TypeGuardError.IProps}
750
- * @returns Reusable assertEquals function `(input: unknown) => T`
765
+ * @returns Reusable assertEquals function `(input: unknown, errorFactory?) =>
766
+ * T`
751
767
  * @danger You must configure the generic argument `T`
752
768
  */
753
769
  export function createAssertEquals(
@@ -763,14 +779,21 @@ export function createAssertEquals(
763
779
  * @template T Target type for exact match
764
780
  * @param errorFactory Custom error factory receiving
765
781
  * {@link TypeGuardError.IProps}
766
- * @returns Reusable assertEquals function `(input: unknown) => T`
782
+ * @returns Reusable assertEquals function `(input: unknown, errorFactory?) =>
783
+ * T`, whose own `errorFactory` overrides this one for that single call
767
784
  */
768
785
  export function createAssertEquals<T>(
769
786
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
770
- ): (input: unknown) => T;
787
+ ): (
788
+ input: unknown,
789
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
790
+ ) => T;
771
791
 
772
792
  /** @internal */
773
- export function createAssertEquals<T>(): (input: unknown) => T {
793
+ export function createAssertEquals<T>(): (
794
+ input: unknown,
795
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
796
+ ) => T {
774
797
  NoTransformConfigurationError("createAssertEquals");
775
798
  }
776
799
 
@@ -781,7 +804,9 @@ export function createAssertEquals<T>(): (input: unknown) => T {
781
804
  *
782
805
  * TypeScript requirement: You must declare the variable type explicitly. `const
783
806
  * fn: AssertionGuard<T> = createAssertGuardEquals<T>()` — otherwise compile
784
- * error.
807
+ * error. That annotation is one parameter wide, so it also hides the call-time
808
+ * `errorFactory`; annotate with `(input: unknown, errorFactory?: (props:
809
+ * TypeGuardError.IProps) => Error) => asserts input is T` when you need it.
785
810
  *
786
811
  * @template T Target type for exact match
787
812
  * @param errorFactory Custom error factory receiving
@@ -800,19 +825,28 @@ export function createAssertGuardEquals(
800
825
  *
801
826
  * TypeScript requirement: You must declare the variable type explicitly. `const
802
827
  * fn: AssertionGuard<T> = createAssertGuardEquals<T>()` — otherwise compile
803
- * error.
828
+ * error. That annotation is one parameter wide, so it also hides the call-time
829
+ * `errorFactory`; annotate with `(input: unknown, errorFactory?: (props:
830
+ * TypeGuardError.IProps) => Error) => asserts input is T` when you need it.
804
831
  *
805
832
  * @template T Target type for exact match
806
833
  * @param errorFactory Custom error factory receiving
807
834
  * {@link TypeGuardError.IProps}
808
- * @returns Reusable assertion guard function
835
+ * @returns Reusable assertion guard function, whose own `errorFactory`
836
+ * overrides this one for that single call
809
837
  */
810
838
  export function createAssertGuardEquals<T>(
811
839
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
812
- ): AssertionGuard<T>;
840
+ ): (
841
+ input: unknown,
842
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
843
+ ) => asserts input is T;
813
844
 
814
845
  /** @internal */
815
- export function createAssertGuardEquals<T>(): AssertionGuard<T> {
846
+ export function createAssertGuardEquals<T>(): (
847
+ input: unknown,
848
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
849
+ ) => asserts input is T {
816
850
  NoTransformConfigurationError("createAssertGuardEquals");
817
851
  }
818
852
 
package/src/notations.ts CHANGED
@@ -530,7 +530,10 @@ export function createAssertCamel(
530
530
  */
531
531
  export function createAssertCamel<T>(
532
532
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
533
- ): (input: T) => CamelCase<T>;
533
+ ): (
534
+ input: T,
535
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
536
+ ) => CamelCase<T>;
534
537
 
535
538
  /** @internal */
536
539
  export function createAssertCamel(): never {
@@ -618,7 +621,10 @@ export function createAssertPascal(
618
621
  */
619
622
  export function createAssertPascal<T>(
620
623
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
621
- ): (input: T) => PascalCase<T>;
624
+ ): (
625
+ input: T,
626
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
627
+ ) => PascalCase<T>;
622
628
 
623
629
  /** @internal */
624
630
  export function createAssertPascal(): never {
@@ -706,7 +712,10 @@ export function createAssertSnake(
706
712
  */
707
713
  export function createAssertSnake<T>(
708
714
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
709
- ): (input: T) => SnakeCase<T>;
715
+ ): (
716
+ input: T,
717
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
718
+ ) => SnakeCase<T>;
710
719
 
711
720
  /** @internal */
712
721
  export function createAssertSnake(): never {
@@ -794,7 +803,10 @@ export function createAssertKebab(
794
803
  */
795
804
  export function createAssertKebab<T>(
796
805
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
797
- ): (input: T) => KebabCase<T>;
806
+ ): (
807
+ input: T,
808
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
809
+ ) => KebabCase<T>;
798
810
 
799
811
  /** @internal */
800
812
  export function createAssertKebab(): never {
package/src/plain.ts CHANGED
@@ -383,7 +383,10 @@ export function createAssertClone(
383
383
  */
384
384
  export function createAssertClone<T>(
385
385
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
386
- ): (input: unknown) => Resolved<T>;
386
+ ): (
387
+ input: unknown,
388
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
389
+ ) => Resolved<T>;
387
390
 
388
391
  /** @internal */
389
392
  export function createAssertClone(): never {
@@ -471,7 +474,10 @@ export function createAssertPrune(
471
474
  */
472
475
  export function createAssertPrune<T extends object>(
473
476
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
474
- ): (input: unknown) => T;
477
+ ): (
478
+ input: unknown,
479
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
480
+ ) => T;
475
481
 
476
482
  /** @internal */
477
483
  export function createAssertPrune(): never {
@@ -563,7 +569,10 @@ export function createAssertClassify(
563
569
  */
564
570
  export function createAssertClassify<T>(
565
571
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
566
- ): (input: unknown) => ClassifyResult<T>;
572
+ ): (
573
+ input: unknown,
574
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
575
+ ) => ClassifyResult<T>;
567
576
 
568
577
  /** @internal */
569
578
  export function createAssertClassify(): never {
package/src/protobuf.ts CHANGED
@@ -377,10 +377,16 @@ export function createAssertDecode(
377
377
  */
378
378
  export function createAssertDecode<T>(
379
379
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
380
- ): (input: Uint8Array) => Resolved<T>;
380
+ ): (
381
+ input: Uint8Array,
382
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
383
+ ) => Resolved<T>;
381
384
 
382
385
  /** @internal */
383
- export function createAssertDecode<T>(): (input: Uint8Array) => Resolved<T> {
386
+ export function createAssertDecode<T>(): (
387
+ input: Uint8Array,
388
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
389
+ ) => Resolved<T> {
384
390
  NoTransformConfigurationError("protobuf.createAssertDecode");
385
391
  }
386
392
 
@@ -467,10 +473,16 @@ export function createAssertEncode(
467
473
  */
468
474
  export function createAssertEncode<T>(
469
475
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
470
- ): (input: T) => Uint8Array;
476
+ ): (
477
+ input: T,
478
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
479
+ ) => Uint8Array;
471
480
 
472
481
  /** @internal */
473
- export function createAssertEncode<T>(): (input: T) => Uint8Array {
482
+ export function createAssertEncode<T>(): (
483
+ input: T,
484
+ errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
485
+ ) => Uint8Array {
474
486
  NoTransformConfigurationError("protobuf.createAssertEncode");
475
487
  }
476
488