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.
- package/lib/http.d.ts +3 -3
- package/lib/http.js.map +1 -1
- package/lib/http.mjs.map +1 -1
- package/lib/internal/_assertGuard.js +13 -3
- package/lib/internal/_assertGuard.js.map +1 -1
- package/lib/internal/_assertGuard.mjs +4 -2
- package/lib/internal/_assertGuard.mjs.map +1 -1
- package/lib/internal/_isFormatIdnHostname.js +5 -1
- package/lib/internal/_isFormatIdnHostname.js.map +1 -1
- package/lib/internal/_isFormatIdnHostname.mjs +1 -1
- package/lib/internal/_isFormatIdnHostname.mjs.map +1 -1
- package/lib/internal/_isFormatTime.js +19 -2
- package/lib/internal/_isFormatTime.js.map +1 -1
- package/lib/internal/_isFormatTime.mjs +9 -2
- package/lib/internal/_isFormatTime.mjs.map +1 -1
- package/lib/internal/_randomArray.js +37 -4
- package/lib/internal/_randomArray.js.map +1 -1
- package/lib/internal/_randomArray.mjs +16 -3
- package/lib/internal/_randomArray.mjs.map +1 -1
- package/lib/internal/_randomFormatByte.js +15 -12
- package/lib/internal/_randomFormatByte.js.map +1 -1
- package/lib/internal/_randomFormatByte.mjs +11 -10
- package/lib/internal/_randomFormatByte.mjs.map +1 -1
- package/lib/internal/_randomFormatDatetime.mjs +1 -1
- package/lib/internal/_randomFormatHostname.d.ts +2 -2
- package/lib/internal/_randomFormatHostname.js +2 -2
- package/lib/internal/_randomFormatHostname.mjs +2 -2
- package/lib/internal/_randomFormatHostname.mjs.map +1 -1
- package/lib/internal/_randomFormatIdnHostname.js +9 -10
- package/lib/internal/_randomFormatIdnHostname.js.map +1 -1
- package/lib/internal/_randomFormatIdnHostname.mjs +3 -4
- package/lib/internal/_randomFormatIdnHostname.mjs.map +1 -1
- package/lib/internal/_randomFormatRegex.js +4 -4
- package/lib/internal/_randomFormatRegex.js.map +1 -1
- package/lib/internal/_randomFormatRegex.mjs +1 -2
- package/lib/internal/_randomFormatRegex.mjs.map +1 -1
- package/lib/internal/_randomFormatTime.js +15 -10
- package/lib/internal/_randomFormatTime.js.map +1 -1
- package/lib/internal/_randomFormatTime.mjs +6 -3
- package/lib/internal/_randomFormatTime.mjs.map +1 -1
- package/lib/internal/private/__randomComposition.d.ts +8 -0
- package/lib/internal/private/__randomComposition.js +21 -1
- package/lib/internal/private/__randomComposition.js.map +1 -1
- package/lib/internal/private/__randomComposition.mjs +18 -1
- package/lib/internal/private/__randomComposition.mjs.map +1 -1
- package/lib/json.d.ts +2 -2
- package/lib/json.js.map +1 -1
- package/lib/json.mjs.map +1 -1
- package/lib/module.d.ts +28 -13
- package/lib/module.js.map +1 -1
- package/lib/module.mjs.map +1 -1
- package/lib/notations.d.ts +4 -4
- package/lib/notations.js.map +1 -1
- package/lib/notations.mjs.map +1 -1
- package/lib/plain.d.ts +3 -3
- package/lib/plain.js.map +1 -1
- package/lib/plain.mjs.map +1 -1
- package/lib/protobuf.d.ts +2 -2
- package/lib/protobuf.js.map +1 -1
- package/lib/protobuf.mjs.map +1 -1
- package/native/cmd/ttsc-typia/assert_guard_factory_contract_test.go +17 -4
- package/native/cmd/ttsc-typia/create_assert_error_factory_arity_test.go +309 -0
- package/native/cmd/ttsc-typia/local_function_named_like_typia_operation_transform_test.go +185 -0
- package/native/cmd/ttsc-typia/recursive_conditional_alias_name_transform_test.go +307 -0
- package/native/cmd/ttsc-typia/shadowed_typia_module_declaration_diagnostic_test.go +152 -0
- package/native/cmd/ttsc-typia/template_literal_type_tags_transform_test.go +1 -3
- package/native/cmd/ttsc-typia/transform_helpers_test.go +92 -26
- package/native/core/factories/FormatCheatSheet.go +2 -2
- package/native/core/factories/MetadataCommentTagFactory.go +26 -11
- package/native/core/factories/factory_utility_coverage_test.go +896 -907
- package/native/core/factories/internal/metadata/MetadataHelper.go +5 -28
- package/native/core/factories/metadata_comment_tag_factory_coverage_test.go +2 -2
- package/native/core/programmers/RandomProgrammer.go +5 -2
- package/native/core/schemas/metadata/MetadataCollection.go +47 -5
- package/native/transform/CallExpressionTransformer.go +167 -0
- package/package.json +3 -3
- package/src/http.ts +18 -4
- package/src/internal/_assertGuard.ts +13 -2
- package/src/internal/_isFormatIdnHostname.ts +5 -1
- package/src/internal/_isFormatTime.ts +19 -2
- package/src/internal/_randomArray.ts +42 -6
- package/src/internal/_randomFormatByte.ts +17 -12
- package/src/internal/_randomFormatHostname.ts +2 -2
- package/src/internal/_randomFormatIdnHostname.ts +8 -9
- package/src/internal/_randomFormatRegex.ts +4 -6
- package/src/internal/_randomFormatTime.ts +15 -10
- package/src/internal/private/__randomComposition.ts +24 -0
- package/src/json.ts +16 -4
- package/src/module.ts +56 -22
- package/src/notations.ts +16 -4
- package/src/plain.ts +12 -3
- package/src/protobuf.ts +16 -4
package/lib/module.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
2
|
-
import {
|
|
2
|
+
import { IRandomGenerator, IValidation, Resolved } from "@typia/interface";
|
|
3
3
|
import { TypeGuardError } from "./TypeGuardError";
|
|
4
4
|
export * as compare from "./compare";
|
|
5
5
|
export * as functional from "./functional";
|
|
@@ -460,7 +460,7 @@ export declare function random<T>(generator?: Partial<IRandomGenerator>): Resolv
|
|
|
460
460
|
* @template T Target type to validate against
|
|
461
461
|
* @param errorFactory Custom error factory receiving
|
|
462
462
|
* {@link TypeGuardError.IProps}
|
|
463
|
-
* @returns Reusable assert function `(input: unknown) => T`
|
|
463
|
+
* @returns Reusable assert function `(input: unknown, errorFactory?) => T`
|
|
464
464
|
* @danger You must configure the generic argument `T`
|
|
465
465
|
*/
|
|
466
466
|
export declare function createAssert(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
@@ -473,9 +473,10 @@ export declare function createAssert(errorFactory?: undefined | ((props: TypeGua
|
|
|
473
473
|
* @template T Target type to validate against
|
|
474
474
|
* @param errorFactory Custom error factory receiving
|
|
475
475
|
* {@link TypeGuardError.IProps}
|
|
476
|
-
* @returns Reusable assert function `(input: unknown) => T
|
|
476
|
+
* @returns Reusable assert function `(input: unknown, errorFactory?) => T`,
|
|
477
|
+
* whose own `errorFactory` overrides this one for that single call
|
|
477
478
|
*/
|
|
478
|
-
export declare function createAssert<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown) => T;
|
|
479
|
+
export declare function createAssert<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)) => T;
|
|
479
480
|
/**
|
|
480
481
|
* Creates reusable {@link assertGuard} function.
|
|
481
482
|
*
|
|
@@ -483,6 +484,9 @@ export declare function createAssert<T>(errorFactory?: undefined | ((props: Type
|
|
|
483
484
|
*
|
|
484
485
|
* TypeScript requirement: You must declare the variable type explicitly. `const
|
|
485
486
|
* fn: AssertionGuard<T> = createAssertGuard<T>()` — otherwise compile error.
|
|
487
|
+
* That annotation is one parameter wide, so it also hides the call-time
|
|
488
|
+
* `errorFactory`; annotate with `(input: unknown, errorFactory?: (props:
|
|
489
|
+
* TypeGuardError.IProps) => Error) => asserts input is T` when you need it.
|
|
486
490
|
*
|
|
487
491
|
* @template T Target type to validate against
|
|
488
492
|
* @param errorFactory Custom error factory receiving
|
|
@@ -498,13 +502,17 @@ export declare function createAssertGuard(errorFactory?: undefined | ((props: Ty
|
|
|
498
502
|
*
|
|
499
503
|
* TypeScript requirement: You must declare the variable type explicitly. `const
|
|
500
504
|
* fn: AssertionGuard<T> = createAssertGuard<T>()` — otherwise compile error.
|
|
505
|
+
* That annotation is one parameter wide, so it also hides the call-time
|
|
506
|
+
* `errorFactory`; annotate with `(input: unknown, errorFactory?: (props:
|
|
507
|
+
* TypeGuardError.IProps) => Error) => asserts input is T` when you need it.
|
|
501
508
|
*
|
|
502
509
|
* @template T Target type to validate against
|
|
503
510
|
* @param errorFactory Custom error factory receiving
|
|
504
511
|
* {@link TypeGuardError.IProps}
|
|
505
|
-
* @returns Reusable assertion guard function
|
|
512
|
+
* @returns Reusable assertion guard function, whose own `errorFactory`
|
|
513
|
+
* overrides this one for that single call
|
|
506
514
|
*/
|
|
507
|
-
export declare function createAssertGuard<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)):
|
|
515
|
+
export declare function createAssertGuard<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)) => asserts input is T;
|
|
508
516
|
/**
|
|
509
517
|
* Creates reusable {@link is} function.
|
|
510
518
|
*
|
|
@@ -583,7 +591,8 @@ export declare function createValidate<T>(): ((input: unknown) => IValidation<T>
|
|
|
583
591
|
* @template T Target type for exact match
|
|
584
592
|
* @param errorFactory Custom error factory receiving
|
|
585
593
|
* {@link TypeGuardError.IProps}
|
|
586
|
-
* @returns Reusable assertEquals function `(input: unknown) =>
|
|
594
|
+
* @returns Reusable assertEquals function `(input: unknown, errorFactory?) =>
|
|
595
|
+
* T`
|
|
587
596
|
* @danger You must configure the generic argument `T`
|
|
588
597
|
*/
|
|
589
598
|
export declare function createAssertEquals(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
@@ -596,9 +605,10 @@ export declare function createAssertEquals(errorFactory?: undefined | ((props: T
|
|
|
596
605
|
* @template T Target type for exact match
|
|
597
606
|
* @param errorFactory Custom error factory receiving
|
|
598
607
|
* {@link TypeGuardError.IProps}
|
|
599
|
-
* @returns Reusable assertEquals function `(input: unknown) =>
|
|
608
|
+
* @returns Reusable assertEquals function `(input: unknown, errorFactory?) =>
|
|
609
|
+
* T`, whose own `errorFactory` overrides this one for that single call
|
|
600
610
|
*/
|
|
601
|
-
export declare function createAssertEquals<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown) => T;
|
|
611
|
+
export declare function createAssertEquals<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)) => T;
|
|
602
612
|
/**
|
|
603
613
|
* Creates reusable {@link assertGuardEquals} function.
|
|
604
614
|
*
|
|
@@ -606,7 +616,9 @@ export declare function createAssertEquals<T>(errorFactory?: undefined | ((props
|
|
|
606
616
|
*
|
|
607
617
|
* TypeScript requirement: You must declare the variable type explicitly. `const
|
|
608
618
|
* fn: AssertionGuard<T> = createAssertGuardEquals<T>()` — otherwise compile
|
|
609
|
-
* error.
|
|
619
|
+
* error. That annotation is one parameter wide, so it also hides the call-time
|
|
620
|
+
* `errorFactory`; annotate with `(input: unknown, errorFactory?: (props:
|
|
621
|
+
* TypeGuardError.IProps) => Error) => asserts input is T` when you need it.
|
|
610
622
|
*
|
|
611
623
|
* @template T Target type for exact match
|
|
612
624
|
* @param errorFactory Custom error factory receiving
|
|
@@ -622,14 +634,17 @@ export declare function createAssertGuardEquals(errorFactory?: undefined | ((pro
|
|
|
622
634
|
*
|
|
623
635
|
* TypeScript requirement: You must declare the variable type explicitly. `const
|
|
624
636
|
* fn: AssertionGuard<T> = createAssertGuardEquals<T>()` — otherwise compile
|
|
625
|
-
* error.
|
|
637
|
+
* error. 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.
|
|
626
640
|
*
|
|
627
641
|
* @template T Target type for exact match
|
|
628
642
|
* @param errorFactory Custom error factory receiving
|
|
629
643
|
* {@link TypeGuardError.IProps}
|
|
630
|
-
* @returns Reusable assertion guard function
|
|
644
|
+
* @returns Reusable assertion guard function, whose own `errorFactory`
|
|
645
|
+
* overrides this one for that single call
|
|
631
646
|
*/
|
|
632
|
-
export declare function createAssertGuardEquals<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)):
|
|
647
|
+
export declare function createAssertGuardEquals<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)) => asserts input is T;
|
|
633
648
|
/**
|
|
634
649
|
* Creates reusable {@link equals} function.
|
|
635
650
|
*
|
package/lib/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,gGAA6F;AAE7F,QAAY,OAAO,sCAAkB;AACrC,QAAY,UAAU,yCAAqB;AAC3C,QAAY,IAAI,mCAAe;AAC/B,QAAY,GAAG,kCAAc;AAC7B,QAAY,IAAI,mCAAe;AAC/B,QAAY,KAAK,oCAAgB;AACjC,QAAY,SAAS,wCAAoB;AACzC,QAAY,QAAQ,uCAAmB;AACvC,QAAY,OAAO,sCAAkB;AAErC,mDAAiC;AAEjC,+CAA6B;AA+D7B,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,QAAQ,CAAC,CAAC;AAC1C,CAAC;AA4DD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,aAAa,CAAC,CAAC;AAC/C,CAAC;AA0CD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,IAAI,CAAC,CAAC;AACtC,CAAC;AAgED,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,SAAS,CAAC,CAAC;AAC3C,CAAC;AAoDD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,UAAU,CAAC,CAAC;AAC5C,CAAC;AAyDD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,cAAc,CAAC,CAAC;AAChD,CAAC;AAoDD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AACrD,CAAC;AAwCD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,QAAQ,CAAC,CAAC;AAC1C,CAAC;AAkDD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,gBAAgB,CAAC,CAAC;AAClD,CAAC;AAgCD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,QAAQ,CAAC,CAAC;AAC1C,CAAC;AAwCD,gBAAgB;AAChB;IAIE,IAAA,6DAA6B,EAAC,cAAc,CAAC,CAAC;AAChD,CAAC;AA+CD,gBAAgB;AAChB;IAIE,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AACrD,CAAC;AAyBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,UAAU,CAAC,CAAC;AAC5C,CAAC;AA+BD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,eAAe,CAAC,CAAC;AACjD,CAAC;AA4BD,gBAAgB;AAChB;IAEE,IAAA,6DAA6B,EAAC,gBAAgB,CAAC,CAAC;AAClD,CAAC;AAsCD,gBAAgB;AAChB;IAIE,IAAA,6DAA6B,EAAC,oBAAoB,CAAC,CAAC;AACtD,CAAC;AA+CD,gBAAgB;AAChB;IAIE,IAAA,6DAA6B,EAAC,yBAAyB,CAAC,CAAC;AAC3D,CAAC;AAyBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,cAAc,CAAC,CAAC;AAChD,CAAC;AA8BD,gBAAgB;AAChB;IAEE,IAAA,6DAA6B,EAAC,sBAAsB,CAAC,CAAC;AACxD,CAAC;AA6BD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,cAAc,CAAC,CAAC;AAChD,CAAC"}
|
package/lib/module.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.mjs","names":[],"sources":["../src/module.ts"],"sourcesContent":["import { StandardSchemaV1 } from \"@standard-schema/spec\";\nimport {\n AssertionGuard,\n IRandomGenerator,\n IValidation,\n Resolved,\n} from \"@typia/interface\";\n\nimport { TypeGuardError } from \"./TypeGuardError\";\nimport { NoTransformConfigurationError } from \"./transformers/NoTransformConfigurationError\";\n\nexport * as compare from \"./compare\";\nexport * as functional from \"./functional\";\nexport * as http from \"./http\";\nexport * as llm from \"./llm\";\nexport * as json from \"./json\";\nexport * as plain from \"./plain\";\nexport * as notations from \"./notations\";\nexport * as protobuf from \"./protobuf\";\nexport * as reflect from \"./reflect\";\n\nexport * from \"./TypeGuardError\";\n\nexport * from \"./re-exports\";\n\n/* -----------------------------------------------------------\n BASIC VALIDATORS\n----------------------------------------------------------- */\n/**\n * Asserts type `T`.\n *\n * Performs runtime type checking against compile-time type `T`. Stops at first\n * mismatch and throws {@link TypeGuardError} containing:\n *\n * - `path`: Property path where error occurred (e.g., `\"input.user.age\"`)\n * - `expected`: Expected type string (e.g., `\"number & ExclusiveMinimum<19>\"`)\n * - `value`: Actual value that failed validation\n *\n * Related functions:\n *\n * - {@link is} — Returns `boolean` instead of throwing\n * - {@link validate} — Collects all errors instead of stopping at first\n * - {@link assertGuard} — Type guard with no return value (narrows type only)\n * - {@link assertEquals} — Also rejects properties not defined in `T`\n *\n * @template T Target type to validate against\n * @param input Value to assert\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns The input value typed as `T`\n * @throws {TypeGuardError} When input doesn't conform to type `T`\n */\nexport function assert<T>(\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): T;\n\n/**\n * Asserts type `T`.\n *\n * Performs runtime type checking against compile-time type `T`. Stops at first\n * mismatch and throws {@link TypeGuardError} containing:\n *\n * - `path`: Property path where error occurred (e.g., `\"input.user.age\"`)\n * - `expected`: Expected type string (e.g., `\"number & ExclusiveMinimum<19>\"`)\n * - `value`: Actual value that failed validation\n *\n * Related functions:\n *\n * - {@link is} — Returns `boolean` instead of throwing\n * - {@link validate} — Collects all errors instead of stopping at first\n * - {@link assertGuard} — Type guard with no return value (narrows type only)\n * - {@link assertEquals} — Also rejects properties not defined in `T`\n *\n * @template T Target type to validate against\n * @param input Value to assert\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns The input value typed as `T`\n * @throws {TypeGuardError} When input doesn't conform to type `T`\n */\nexport function assert<T>(\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): T;\n\n/** @internal */\nexport function assert(): never {\n NoTransformConfigurationError(\"assert\");\n}\n\n/**\n * Asserts type `T` as assertion guard.\n *\n * Unlike {@link assert}, returns nothing (`asserts input is T`). After this\n * call, TypeScript narrows `input` to type `T` in subsequent code. Useful when\n * you need type narrowing with runtime validation but don't need the return\n * value.\n *\n * Throws {@link TypeGuardError} on first mismatch with `path`, `expected`, and\n * `value`.\n *\n * Related functions:\n *\n * - {@link assert} — Same validation but returns the input value\n * - {@link is} — Returns `boolean` instead of throwing\n * - {@link validate} — Collects all errors instead of throwing\n * - {@link assertGuardEquals} — Also rejects properties not defined in `T`\n *\n * @template T Target type to validate against\n * @param input Value to assert (narrowed to `T` after call)\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @throws {TypeGuardError} When input doesn't conform to type `T`\n */\nexport function assertGuard<T>(\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): asserts input is T;\n\n/**\n * Asserts type `T` as assertion guard.\n *\n * Unlike {@link assert}, returns nothing (`asserts input is T`). After this\n * call, TypeScript narrows `input` to type `T` in subsequent code. Useful when\n * you need type narrowing with runtime validation but don't need the return\n * value.\n *\n * Throws {@link TypeGuardError} on first mismatch with `path`, `expected`, and\n * `value`.\n *\n * Related functions:\n *\n * - {@link assert} — Same validation but returns the input value\n * - {@link is} — Returns `boolean` instead of throwing\n * - {@link validate} — Collects all errors instead of throwing\n * - {@link assertGuardEquals} — Also rejects properties not defined in `T`\n *\n * @template T Target type to validate against\n * @param input Value to assert (narrowed to `T` after call)\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @throws {TypeGuardError} When input doesn't conform to type `T`\n */\nexport function assertGuard<T>(\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): asserts input is T;\n\n/** @internal */\nexport function assertGuard(): never {\n NoTransformConfigurationError(\"assertGuard\");\n}\n\n/**\n * Tests type `T`.\n *\n * Performs runtime type checking without throwing exceptions. Acts as\n * TypeScript type guard, narrowing the input type in conditional branches when\n * result is `true`.\n *\n * Related functions:\n *\n * - {@link assert} — Throws {@link TypeGuardError} with detailed error info on\n * mismatch\n * - {@link validate} — Returns all errors without throwing\n * - {@link equals} — Also rejects properties not defined in `T`\n *\n * @template T Target type to check\n * @param input Value to test\n * @returns `true` if valid, `false` otherwise (type predicate `input is T`)\n */\nexport function is<T>(input: T): input is T;\n\n/**\n * Tests type `T`.\n *\n * Performs runtime type checking without throwing exceptions. Acts as\n * TypeScript type guard, narrowing the input type in conditional branches when\n * result is `true`.\n *\n * Related functions:\n *\n * - {@link assert} — Throws {@link TypeGuardError} with detailed error info on\n * mismatch\n * - {@link validate} — Returns all errors without throwing\n * - {@link equals} — Also rejects properties not defined in `T`\n *\n * @template T Target type to check\n * @param input Value to test\n * @returns `true` if valid, `false` otherwise (type predicate `input is T`)\n */\nexport function is<T>(input: unknown): input is T;\n\n/** @internal */\nexport function is(): never {\n NoTransformConfigurationError(\"is\");\n}\n\n/**\n * Tests type `T` up to a limited depth.\n *\n * Like {@link is}, but only descends into nested objects, arrays, and tuples\n * until the depth budget `N` is exhausted; beyond that point a value is\n * accepted as long as it is an `object` (or `null` where the type permits).\n * Useful for **discrimination** rather than full validation — when you only\n * need to know which branch of a union an input belongs to, paying for a deep\n * structural check of every leaf is wasteful.\n *\n * Because the check is shallow past depth `N`, a `true` result is **not** a\n * guarantee that the whole value conforms to `T`. The name `shallow` reflects\n * this: only the discriminating, near-surface part of the type is verified. For\n * a full guarantee, use {@link is}.\n *\n * Related functions:\n *\n * - {@link is} — Full-depth check, returns a sound type guard\n * - {@link assert} — Throws {@link TypeGuardError} with detailed error info on\n * mismatch\n * - {@link validate} — Returns all errors without throwing\n *\n * @template T Target type to check\n * @template N Maximum depth to descend before accepting a value structurally.\n * Must be a non-negative integer literal. Defaults to `2`.\n * @param input Value to test\n * @returns `true` if valid up to depth `N`, `false` otherwise (type predicate\n * `input is T`)\n */\nexport function shallow<T, N extends number = 2>(input: T): input is T;\n\n/**\n * Tests type `T` up to a limited depth.\n *\n * Like {@link is}, but only descends into nested objects, arrays, and tuples\n * until the depth budget `N` is exhausted; beyond that point a value is\n * accepted as long as it is an `object` (or `null` where the type permits).\n * Useful for **discrimination** rather than full validation — when you only\n * need to know which branch of a union an input belongs to, paying for a deep\n * structural check of every leaf is wasteful.\n *\n * Because the check is shallow past depth `N`, a `true` result is **not** a\n * guarantee that the whole value conforms to `T`. The name `shallow` reflects\n * this: only the discriminating, near-surface part of the type is verified. For\n * a full guarantee, use {@link is}.\n *\n * Related functions:\n *\n * - {@link is} — Full-depth check, returns a sound type guard\n * - {@link assert} — Throws {@link TypeGuardError} with detailed error info on\n * mismatch\n * - {@link validate} — Returns all errors without throwing\n *\n * @template T Target type to check\n * @template N Maximum depth to descend before accepting a value structurally.\n * Must be a non-negative integer literal. Defaults to `2`.\n * @param input Value to test\n * @returns `true` if valid up to depth `N`, `false` otherwise (type predicate\n * `input is T`)\n */\nexport function shallow<T, N extends number = 2>(input: unknown): input is T;\n\n/** @internal */\nexport function shallow(): never {\n NoTransformConfigurationError(\"shallow\");\n}\n\n/**\n * Validates type `T`.\n *\n * Unlike {@link assert} which throws on first error, this function continues\n * checking and collects all type mismatches into {@link IValidation.errors}\n * array. Never throws.\n *\n * Return structure:\n *\n * - `success: true` → `data` contains validated input as `T`\n * - `success: false` → `errors` array of {@link IValidation.IError} with `path`,\n * `expected`, `value`\n *\n * Related functions:\n *\n * - {@link assert} — Throws on first error instead of collecting all\n * - {@link is} — Simple boolean check\n * - {@link validateEquals} — Also rejects properties not defined in `T`\n *\n * @template T Target type to validate against\n * @param input Value to validate\n * @returns {@link IValidation} <T> containing either `data` or `errors`\n */\nexport function validate<T>(input: T): IValidation<T>;\n\n/**\n * Validates type `T`.\n *\n * Unlike {@link assert} which throws on first error, this function continues\n * checking and collects all type mismatches into {@link IValidation.errors}\n * array. Never throws.\n *\n * Return structure:\n *\n * - `success: true` → `data` contains validated input as `T`\n * - `success: false` → `errors` array of {@link IValidation.IError} with `path`,\n * `expected`, `value`\n *\n * Related functions:\n *\n * - {@link assert} — Throws on first error instead of collecting all\n * - {@link is} — Simple boolean check\n * - {@link validateEquals} — Also rejects properties not defined in `T`\n *\n * @template T Target type to validate against\n * @param input Value to validate\n * @returns {@link IValidation} <T> containing either `data` or `errors`\n */\nexport function validate<T>(input: unknown): IValidation<T>;\n\n/** @internal */\nexport function validate(): never {\n NoTransformConfigurationError(\"validate\");\n}\n\n/* -----------------------------------------------------------\n STRICT VALIDATORS\n----------------------------------------------------------- */\n/**\n * Asserts type `T` with strict equality.\n *\n * Stricter than {@link assert}: also fails when input contains any property not\n * defined in type `T`. For extra property errors, `expected` will be\n * `\"undefined\"`.\n *\n * Related functions:\n *\n * - {@link assert} — Allows extra properties\n * - {@link equals} — Boolean result without throwing\n * - {@link validateEquals} — Collects all errors without throwing\n * - {@link assertGuardEquals} — Type guard version with no return value\n *\n * @template T Target type for exact match\n * @param input Value to validate\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns The input value typed as `T`\n * @throws {TypeGuardError} When type mismatch or extra property detected\n */\nexport function assertEquals<T>(\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): T;\n\n/**\n * Asserts type `T` with strict equality.\n *\n * Stricter than {@link assert}: also fails when input contains any property not\n * defined in type `T`. For extra property errors, `expected` will be\n * `\"undefined\"`.\n *\n * Related functions:\n *\n * - {@link assert} — Allows extra properties\n * - {@link equals} — Boolean result without throwing\n * - {@link validateEquals} — Collects all errors without throwing\n * - {@link assertGuardEquals} — Type guard version with no return value\n *\n * @template T Target type for exact match\n * @param input Value to validate\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns The input value typed as `T`\n * @throws {TypeGuardError} When type mismatch or extra property detected\n */\nexport function assertEquals<T>(\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): T;\n\n/** @internal */\nexport function assertEquals(): never {\n NoTransformConfigurationError(\"assertEquals\");\n}\n\n/**\n * Asserts type `T` with strict equality as assertion guard.\n *\n * Combines {@link assertGuard} with strict equality checking. Returns nothing\n * but narrows input to type `T`. Also fails when input contains properties not\n * in `T`.\n *\n * Related functions:\n *\n * - {@link assertGuard} — Allows extra properties\n * - {@link assertEquals} — Returns value instead of type guard\n * - {@link equals} — Boolean result without throwing\n * - {@link validateEquals} — Collects all errors without throwing\n *\n * @template T Target type for exact match\n * @param input Value to assert (narrowed to `T` after call)\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @throws {TypeGuardError} When type mismatch or extra property detected\n */\nexport function assertGuardEquals<T>(\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): asserts input is T;\n\n/**\n * Asserts type `T` with strict equality as assertion guard.\n *\n * Combines {@link assertGuard} with strict equality checking. Returns nothing\n * but narrows input to type `T`. Also fails when input contains properties not\n * in `T`.\n *\n * Related functions:\n *\n * - {@link assertGuard} — Allows extra properties\n * - {@link assertEquals} — Returns value instead of type guard\n * - {@link equals} — Boolean result without throwing\n * - {@link validateEquals} — Collects all errors without throwing\n *\n * @template T Target type for exact match\n * @param input Value to assert (narrowed to `T` after call)\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @throws {TypeGuardError} When type mismatch or extra property detected\n */\nexport function assertGuardEquals<T>(\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): asserts input is T;\n\n/** @internal */\nexport function assertGuardEquals(): never {\n NoTransformConfigurationError(\"assertGuardEquals\");\n}\n\n/**\n * Tests type `T` with strict equality.\n *\n * Stricter than {@link is}: also returns `false` when input contains any\n * property not defined in type `T`. Useful for detecting unexpected data or\n * typos.\n *\n * Related functions:\n *\n * - {@link is} — Allows extra properties\n * - {@link assertEquals} — Throws with detailed error info on mismatch\n * - {@link validateEquals} — Returns all errors without throwing\n *\n * @template T Target type for exact match\n * @param input Value to test\n * @returns `true` if valid, `false` otherwise (type predicate `input is T`)\n */\nexport function equals<T>(input: T): input is T;\n\n/**\n * Tests type `T` with strict equality.\n *\n * Stricter than {@link is}: also returns `false` when input contains any\n * property not defined in type `T`. Useful for detecting unexpected data or\n * typos.\n *\n * Related functions:\n *\n * - {@link is} — Allows extra properties\n * - {@link assertEquals} — Throws with detailed error info on mismatch\n * - {@link validateEquals} — Returns all errors without throwing\n *\n * @template T Target type for exact match\n * @param input Value to test\n * @returns `true` if valid, `false` otherwise (type predicate `input is T`)\n */\nexport function equals<T>(input: unknown): input is T;\n\n/** @internal */\nexport function equals(): never {\n NoTransformConfigurationError(\"equals\");\n}\n\n/**\n * Validates type `T` with strict equality.\n *\n * Combines {@link validate} with strict equality checking. Collects all errors\n * including extra property violations into {@link IValidation.errors} array.\n *\n * Return structure:\n *\n * - `success: true` → `data` contains validated input as `T`\n * - `success: false` → `errors` array with `path`, `expected`, `value` for each\n * mismatch\n *\n * Related functions:\n *\n * - {@link validate} — Allows extra properties\n * - {@link assertEquals} — Throws on first error\n * - {@link equals} — Simple boolean check\n *\n * @template T Target type for exact match\n * @param input Value to validate\n * @returns {@link IValidation} <T> containing either `data` or `errors`\n */\nexport function validateEquals<T>(input: T): IValidation<T>;\n\n/**\n * Validates type `T` with strict equality.\n *\n * Combines {@link validate} with strict equality checking. Collects all errors\n * including extra property violations into {@link IValidation.errors} array.\n *\n * Return structure:\n *\n * - `success: true` → `data` contains validated input as `T`\n * - `success: false` → `errors` array with `path`, `expected`, `value` for each\n * mismatch\n *\n * Related functions:\n *\n * - {@link validate} — Allows extra properties\n * - {@link assertEquals} — Throws on first error\n * - {@link equals} — Simple boolean check\n *\n * @template T Target type for exact match\n * @param input Value to validate\n * @returns {@link IValidation} <T> containing either `data` or `errors`\n */\nexport function validateEquals<T>(input: unknown): IValidation<T>;\n\n/** @internal */\nexport function validateEquals(): never {\n NoTransformConfigurationError(\"validateEquals\");\n}\n\n/* -----------------------------------------------------------\n RANDOM\n----------------------------------------------------------- */\n/**\n * Generates random data of type `T`.\n *\n * Creates random instance conforming to compile-time type `T`. Generates only\n * primitive data; methods in `T` are ignored. If `T` has `toJSON()` method,\n * generates its return type instead.\n *\n * @template T Type of data to generate\n * @param generator Custom random generator implementing {@link IRandomGenerator}\n * @returns Randomly generated data as `Resolved<T>`\n * @danger You must configure the generic argument `T`\n */\nexport function random(generator?: Partial<IRandomGenerator>): never;\n\n/**\n * Generates random data of type `T`.\n *\n * Creates random instance conforming to compile-time type `T`. Generates only\n * primitive data; methods in `T` are ignored. If `T` has `toJSON()` method,\n * generates its return type instead.\n *\n * @template T Type of data to generate\n * @param generator Custom random generator implementing {@link IRandomGenerator}\n * @returns Randomly generated data as `Resolved<T>`\n */\nexport function random<T>(generator?: Partial<IRandomGenerator>): Resolved<T>;\n\n/** @internal */\nexport function random(): never {\n NoTransformConfigurationError(\"random\");\n}\n\n/* -----------------------------------------------------------\n FACTORY FUNCTIONS\n----------------------------------------------------------- */\n/**\n * Creates reusable {@link assert} function.\n *\n * Returns a function that can be called multiple times without recompilation.\n * Useful when the same type validation is needed repeatedly.\n *\n * @template T Target type to validate against\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable assert function `(input: unknown) => T`\n * @danger You must configure the generic argument `T`\n */\nexport function createAssert(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assert} function.\n *\n * Returns a function that can be called multiple times without recompilation.\n * Useful when the same type validation is needed repeatedly.\n *\n * @template T Target type to validate against\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable assert function `(input: unknown) => T`\n */\nexport function createAssert<T>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (input: unknown) => T;\n\n/** @internal */\nexport function createAssert<T>(): (input: unknown) => T {\n NoTransformConfigurationError(\"createAssert\");\n}\n\n/**\n * Creates reusable {@link assertGuard} function.\n *\n * Returns a reusable type guard assertion function.\n *\n * TypeScript requirement: You must declare the variable type explicitly. `const\n * fn: AssertionGuard<T> = createAssertGuard<T>()` — otherwise compile error.\n *\n * @template T Target type to validate against\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable assertion guard function\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertGuard(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertGuard} function.\n *\n * Returns a reusable type guard assertion function.\n *\n * TypeScript requirement: You must declare the variable type explicitly. `const\n * fn: AssertionGuard<T> = createAssertGuard<T>()` — otherwise compile error.\n *\n * @template T Target type to validate against\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable assertion guard function\n */\nexport function createAssertGuard<T>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): AssertionGuard<T>;\n\n/** @internal */\nexport function createAssertGuard<T>(): AssertionGuard<T> {\n NoTransformConfigurationError(\"createAssertGuard\");\n}\n\n/**\n * Creates reusable {@link is} function.\n *\n * Returns a type guard function that can be called multiple times without\n * recompilation.\n *\n * @template T Target type to check\n * @returns Reusable type guard function `(input: unknown) => input is T`\n * @danger You must configure the generic argument `T`\n */\nexport function createIs(): never;\n\n/**\n * Creates reusable {@link is} function.\n *\n * Returns a type guard function that can be called multiple times without\n * recompilation.\n *\n * @template T Target type to check\n * @returns Reusable type guard function `(input: unknown) => input is T`\n */\nexport function createIs<T>(): (input: unknown) => input is T;\n\n/** @internal */\nexport function createIs<T>(): (input: unknown) => input is T {\n NoTransformConfigurationError(\"createIs\");\n}\n\n/**\n * Creates reusable {@link shallow} function.\n *\n * Returns a depth-limited type guard function that can be called multiple times\n * without recompilation.\n *\n * @template T Target type to check\n * @template N Maximum depth to descend before accepting a value structurally.\n * Must be a non-negative integer literal. Defaults to `2`.\n * @returns Reusable type guard function `(input: unknown) => input is T`\n * @danger You must configure the generic argument `T`\n */\nexport function createShallow(): never;\n\n/**\n * Creates reusable {@link shallow} function.\n *\n * Returns a depth-limited type guard function that can be called multiple times\n * without recompilation.\n *\n * @template T Target type to check\n * @template N Maximum depth to descend before accepting a value structurally.\n * Must be a non-negative integer literal. Defaults to `2`.\n * @returns Reusable type guard function `(input: unknown) => input is T`\n */\nexport function createShallow<T, N extends number = 2>(): (\n input: unknown,\n) => input is T;\n\n/** @internal */\nexport function createShallow<T>(): (input: unknown) => input is T {\n NoTransformConfigurationError(\"createShallow\");\n}\n\n/**\n * Creates reusable {@link validate} function.\n *\n * Returns a validation function that can be called multiple times without\n * recompilation. Also implements {@link StandardSchemaV1} interface for\n * interoperability.\n *\n * @template T Target type to validate against\n * @returns Reusable validate function `(input: unknown) => IValidation<T>`\n * @danger You must configure the generic argument `T`\n */\nexport function createValidate(): never;\n\n/**\n * Creates reusable {@link validate} function.\n *\n * Returns a validation function that can be called multiple times without\n * recompilation. Also implements {@link StandardSchemaV1} interface for\n * interoperability.\n *\n * @template T Target type to validate against\n * @returns Reusable validate function `(input: unknown) => IValidation<T>`\n */\nexport function createValidate<T>(): ((input: unknown) => IValidation<T>) &\n StandardSchemaV1<T, T>;\n\n/** @internal */\nexport function createValidate(): ((input: unknown) => IValidation) &\n StandardSchemaV1<unknown, unknown> {\n NoTransformConfigurationError(\"createValidate\");\n}\n\n/**\n * Creates reusable {@link assertEquals} function.\n *\n * Returns a strict assertion function that rejects superfluous properties. Can\n * be called multiple times without recompilation.\n *\n * @template T Target type for exact match\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable assertEquals function `(input: unknown) => T`\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertEquals(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertEquals} function.\n *\n * Returns a strict assertion function that rejects superfluous properties. Can\n * be called multiple times without recompilation.\n *\n * @template T Target type for exact match\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable assertEquals function `(input: unknown) => T`\n */\nexport function createAssertEquals<T>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (input: unknown) => T;\n\n/** @internal */\nexport function createAssertEquals<T>(): (input: unknown) => T {\n NoTransformConfigurationError(\"createAssertEquals\");\n}\n\n/**\n * Creates reusable {@link assertGuardEquals} function.\n *\n * Returns a strict assertion guard that rejects superfluous properties.\n *\n * TypeScript requirement: You must declare the variable type explicitly. `const\n * fn: AssertionGuard<T> = createAssertGuardEquals<T>()` — otherwise compile\n * error.\n *\n * @template T Target type for exact match\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable assertion guard function\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertGuardEquals(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertGuardEquals} function.\n *\n * Returns a strict assertion guard that rejects superfluous properties.\n *\n * TypeScript requirement: You must declare the variable type explicitly. `const\n * fn: AssertionGuard<T> = createAssertGuardEquals<T>()` — otherwise compile\n * error.\n *\n * @template T Target type for exact match\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable assertion guard function\n */\nexport function createAssertGuardEquals<T>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): AssertionGuard<T>;\n\n/** @internal */\nexport function createAssertGuardEquals<T>(): AssertionGuard<T> {\n NoTransformConfigurationError(\"createAssertGuardEquals\");\n}\n\n/**\n * Creates reusable {@link equals} function.\n *\n * Returns a strict type guard that rejects superfluous properties. Can be\n * called multiple times without recompilation.\n *\n * @template T Target type for exact match\n * @returns Reusable type guard function `(input: unknown) => input is T`\n * @danger You must configure the generic argument `T`\n */\nexport function createEquals(): never;\n\n/**\n * Creates reusable {@link equals} function.\n *\n * Returns a strict type guard that rejects superfluous properties. Can be\n * called multiple times without recompilation.\n *\n * @template T Target type for exact match\n * @returns Reusable type guard function `(input: unknown) => input is T`\n */\nexport function createEquals<T>(): (input: unknown) => input is T;\n\n/** @internal */\nexport function createEquals<T>(): (input: unknown) => input is T {\n NoTransformConfigurationError(\"createEquals\");\n}\n\n/**\n * Creates reusable {@link validateEquals} function.\n *\n * Returns a strict validation function that rejects superfluous properties.\n * Also implements {@link StandardSchemaV1} interface for interoperability.\n *\n * @template T Target type for exact match\n * @returns Reusable validateEquals function `(input: unknown) =>\n * IValidation<T>`\n * @danger You must configure the generic argument `T`\n */\nexport function createValidateEquals(): never;\n\n/**\n * Creates reusable {@link validateEquals} function.\n *\n * Returns a strict validation function that rejects superfluous properties.\n * Also implements {@link StandardSchemaV1} interface for interoperability.\n *\n * @template T Target type for exact match\n * @returns Reusable validateEquals function `(input: unknown) =>\n * IValidation<T>`\n */\nexport function createValidateEquals<T>(): ((\n input: unknown,\n) => IValidation<T>) &\n StandardSchemaV1<T, T>;\n\n/** @internal */\nexport function createValidateEquals(): ((input: unknown) => IValidation) &\n StandardSchemaV1<unknown, unknown> {\n NoTransformConfigurationError(\"createValidateEquals\");\n}\n\n/**\n * Creates reusable {@link random} function.\n *\n * Returns a random data generator that can be called multiple times without\n * recompilation.\n *\n * @template T Type of data to generate\n * @param generator Custom random generator implementing {@link IRandomGenerator}\n * @returns Reusable random function `() => Resolved<T>`\n * @danger You must configure the generic argument `T`\n */\nexport function createRandom(generator?: Partial<IRandomGenerator>): never;\n\n/**\n * Creates reusable {@link random} function.\n *\n * Returns a random data generator that can be called multiple times without\n * recompilation.\n *\n * @template T Type of data to generate\n * @param generator Custom random generator implementing {@link IRandomGenerator}\n * @returns Reusable random function `() => Resolved<T>`\n */\nexport function createRandom<T>(\n generator?: Partial<IRandomGenerator>,\n): () => Resolved<T>;\n\n/** @internal */\nexport function createRandom(): never {\n NoTransformConfigurationError(\"createRandom\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFA,SAAgB,SAAgB;CAC9B,8BAA8B,QAAQ;AACxC;;AA6DA,SAAgB,cAAqB;CACnC,8BAA8B,aAAa;AAC7C;;AA2CA,SAAgB,KAAY;CAC1B,8BAA8B,IAAI;AACpC;;AAiEA,SAAgB,UAAiB;CAC/B,8BAA8B,SAAS;AACzC;;AAqDA,SAAgB,WAAkB;CAChC,8BAA8B,UAAU;AAC1C;;AA0DA,SAAgB,eAAsB;CACpC,8BAA8B,cAAc;AAC9C;;AAqDA,SAAgB,oBAA2B;CACzC,8BAA8B,mBAAmB;AACnD;;AAyCA,SAAgB,SAAgB;CAC9B,8BAA8B,QAAQ;AACxC;;AAmDA,SAAgB,iBAAwB;CACtC,8BAA8B,gBAAgB;AAChD;;AAiCA,SAAgB,SAAgB;CAC9B,8BAA8B,QAAQ;AACxC;;AAqCA,SAAgB,eAAyC;CACvD,8BAA8B,cAAc;AAC9C;;AAsCA,SAAgB,oBAA0C;CACxD,8BAA8B,mBAAmB;AACnD;;AA0BA,SAAgB,WAA8C;CAC5D,8BAA8B,UAAU;AAC1C;;AAgCA,SAAgB,gBAAmD;CACjE,8BAA8B,eAAe;AAC/C;;AA6BA,SAAgB,iBACqB;CACnC,8BAA8B,gBAAgB;AAChD;;AAkCA,SAAgB,qBAA+C;CAC7D,8BAA8B,oBAAoB;AACpD;;AAwCA,SAAgB,0BAAgD;CAC9D,8BAA8B,yBAAyB;AACzD;;AA0BA,SAAgB,eAAkD;CAChE,8BAA8B,cAAc;AAC9C;;AA+BA,SAAgB,uBACqB;CACnC,8BAA8B,sBAAsB;AACtD;;AA8BA,SAAgB,eAAsB;CACpC,8BAA8B,cAAc;AAC9C"}
|
|
1
|
+
{"version":3,"file":"module.mjs","names":[],"sources":["../src/module.ts"],"sourcesContent":["import { StandardSchemaV1 } from \"@standard-schema/spec\";\nimport { IRandomGenerator, IValidation, Resolved } from \"@typia/interface\";\n\nimport { TypeGuardError } from \"./TypeGuardError\";\nimport { NoTransformConfigurationError } from \"./transformers/NoTransformConfigurationError\";\n\nexport * as compare from \"./compare\";\nexport * as functional from \"./functional\";\nexport * as http from \"./http\";\nexport * as llm from \"./llm\";\nexport * as json from \"./json\";\nexport * as plain from \"./plain\";\nexport * as notations from \"./notations\";\nexport * as protobuf from \"./protobuf\";\nexport * as reflect from \"./reflect\";\n\nexport * from \"./TypeGuardError\";\n\nexport * from \"./re-exports\";\n\n/* -----------------------------------------------------------\n BASIC VALIDATORS\n----------------------------------------------------------- */\n/**\n * Asserts type `T`.\n *\n * Performs runtime type checking against compile-time type `T`. Stops at first\n * mismatch and throws {@link TypeGuardError} containing:\n *\n * - `path`: Property path where error occurred (e.g., `\"input.user.age\"`)\n * - `expected`: Expected type string (e.g., `\"number & ExclusiveMinimum<19>\"`)\n * - `value`: Actual value that failed validation\n *\n * Related functions:\n *\n * - {@link is} — Returns `boolean` instead of throwing\n * - {@link validate} — Collects all errors instead of stopping at first\n * - {@link assertGuard} — Type guard with no return value (narrows type only)\n * - {@link assertEquals} — Also rejects properties not defined in `T`\n *\n * @template T Target type to validate against\n * @param input Value to assert\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns The input value typed as `T`\n * @throws {TypeGuardError} When input doesn't conform to type `T`\n */\nexport function assert<T>(\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): T;\n\n/**\n * Asserts type `T`.\n *\n * Performs runtime type checking against compile-time type `T`. Stops at first\n * mismatch and throws {@link TypeGuardError} containing:\n *\n * - `path`: Property path where error occurred (e.g., `\"input.user.age\"`)\n * - `expected`: Expected type string (e.g., `\"number & ExclusiveMinimum<19>\"`)\n * - `value`: Actual value that failed validation\n *\n * Related functions:\n *\n * - {@link is} — Returns `boolean` instead of throwing\n * - {@link validate} — Collects all errors instead of stopping at first\n * - {@link assertGuard} — Type guard with no return value (narrows type only)\n * - {@link assertEquals} — Also rejects properties not defined in `T`\n *\n * @template T Target type to validate against\n * @param input Value to assert\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns The input value typed as `T`\n * @throws {TypeGuardError} When input doesn't conform to type `T`\n */\nexport function assert<T>(\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): T;\n\n/** @internal */\nexport function assert(): never {\n NoTransformConfigurationError(\"assert\");\n}\n\n/**\n * Asserts type `T` as assertion guard.\n *\n * Unlike {@link assert}, returns nothing (`asserts input is T`). After this\n * call, TypeScript narrows `input` to type `T` in subsequent code. Useful when\n * you need type narrowing with runtime validation but don't need the return\n * value.\n *\n * Throws {@link TypeGuardError} on first mismatch with `path`, `expected`, and\n * `value`.\n *\n * Related functions:\n *\n * - {@link assert} — Same validation but returns the input value\n * - {@link is} — Returns `boolean` instead of throwing\n * - {@link validate} — Collects all errors instead of throwing\n * - {@link assertGuardEquals} — Also rejects properties not defined in `T`\n *\n * @template T Target type to validate against\n * @param input Value to assert (narrowed to `T` after call)\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @throws {TypeGuardError} When input doesn't conform to type `T`\n */\nexport function assertGuard<T>(\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): asserts input is T;\n\n/**\n * Asserts type `T` as assertion guard.\n *\n * Unlike {@link assert}, returns nothing (`asserts input is T`). After this\n * call, TypeScript narrows `input` to type `T` in subsequent code. Useful when\n * you need type narrowing with runtime validation but don't need the return\n * value.\n *\n * Throws {@link TypeGuardError} on first mismatch with `path`, `expected`, and\n * `value`.\n *\n * Related functions:\n *\n * - {@link assert} — Same validation but returns the input value\n * - {@link is} — Returns `boolean` instead of throwing\n * - {@link validate} — Collects all errors instead of throwing\n * - {@link assertGuardEquals} — Also rejects properties not defined in `T`\n *\n * @template T Target type to validate against\n * @param input Value to assert (narrowed to `T` after call)\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @throws {TypeGuardError} When input doesn't conform to type `T`\n */\nexport function assertGuard<T>(\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): asserts input is T;\n\n/** @internal */\nexport function assertGuard(): never {\n NoTransformConfigurationError(\"assertGuard\");\n}\n\n/**\n * Tests type `T`.\n *\n * Performs runtime type checking without throwing exceptions. Acts as\n * TypeScript type guard, narrowing the input type in conditional branches when\n * result is `true`.\n *\n * Related functions:\n *\n * - {@link assert} — Throws {@link TypeGuardError} with detailed error info on\n * mismatch\n * - {@link validate} — Returns all errors without throwing\n * - {@link equals} — Also rejects properties not defined in `T`\n *\n * @template T Target type to check\n * @param input Value to test\n * @returns `true` if valid, `false` otherwise (type predicate `input is T`)\n */\nexport function is<T>(input: T): input is T;\n\n/**\n * Tests type `T`.\n *\n * Performs runtime type checking without throwing exceptions. Acts as\n * TypeScript type guard, narrowing the input type in conditional branches when\n * result is `true`.\n *\n * Related functions:\n *\n * - {@link assert} — Throws {@link TypeGuardError} with detailed error info on\n * mismatch\n * - {@link validate} — Returns all errors without throwing\n * - {@link equals} — Also rejects properties not defined in `T`\n *\n * @template T Target type to check\n * @param input Value to test\n * @returns `true` if valid, `false` otherwise (type predicate `input is T`)\n */\nexport function is<T>(input: unknown): input is T;\n\n/** @internal */\nexport function is(): never {\n NoTransformConfigurationError(\"is\");\n}\n\n/**\n * Tests type `T` up to a limited depth.\n *\n * Like {@link is}, but only descends into nested objects, arrays, and tuples\n * until the depth budget `N` is exhausted; beyond that point a value is\n * accepted as long as it is an `object` (or `null` where the type permits).\n * Useful for **discrimination** rather than full validation — when you only\n * need to know which branch of a union an input belongs to, paying for a deep\n * structural check of every leaf is wasteful.\n *\n * Because the check is shallow past depth `N`, a `true` result is **not** a\n * guarantee that the whole value conforms to `T`. The name `shallow` reflects\n * this: only the discriminating, near-surface part of the type is verified. For\n * a full guarantee, use {@link is}.\n *\n * Related functions:\n *\n * - {@link is} — Full-depth check, returns a sound type guard\n * - {@link assert} — Throws {@link TypeGuardError} with detailed error info on\n * mismatch\n * - {@link validate} — Returns all errors without throwing\n *\n * @template T Target type to check\n * @template N Maximum depth to descend before accepting a value structurally.\n * Must be a non-negative integer literal. Defaults to `2`.\n * @param input Value to test\n * @returns `true` if valid up to depth `N`, `false` otherwise (type predicate\n * `input is T`)\n */\nexport function shallow<T, N extends number = 2>(input: T): input is T;\n\n/**\n * Tests type `T` up to a limited depth.\n *\n * Like {@link is}, but only descends into nested objects, arrays, and tuples\n * until the depth budget `N` is exhausted; beyond that point a value is\n * accepted as long as it is an `object` (or `null` where the type permits).\n * Useful for **discrimination** rather than full validation — when you only\n * need to know which branch of a union an input belongs to, paying for a deep\n * structural check of every leaf is wasteful.\n *\n * Because the check is shallow past depth `N`, a `true` result is **not** a\n * guarantee that the whole value conforms to `T`. The name `shallow` reflects\n * this: only the discriminating, near-surface part of the type is verified. For\n * a full guarantee, use {@link is}.\n *\n * Related functions:\n *\n * - {@link is} — Full-depth check, returns a sound type guard\n * - {@link assert} — Throws {@link TypeGuardError} with detailed error info on\n * mismatch\n * - {@link validate} — Returns all errors without throwing\n *\n * @template T Target type to check\n * @template N Maximum depth to descend before accepting a value structurally.\n * Must be a non-negative integer literal. Defaults to `2`.\n * @param input Value to test\n * @returns `true` if valid up to depth `N`, `false` otherwise (type predicate\n * `input is T`)\n */\nexport function shallow<T, N extends number = 2>(input: unknown): input is T;\n\n/** @internal */\nexport function shallow(): never {\n NoTransformConfigurationError(\"shallow\");\n}\n\n/**\n * Validates type `T`.\n *\n * Unlike {@link assert} which throws on first error, this function continues\n * checking and collects all type mismatches into {@link IValidation.errors}\n * array. Never throws.\n *\n * Return structure:\n *\n * - `success: true` → `data` contains validated input as `T`\n * - `success: false` → `errors` array of {@link IValidation.IError} with `path`,\n * `expected`, `value`\n *\n * Related functions:\n *\n * - {@link assert} — Throws on first error instead of collecting all\n * - {@link is} — Simple boolean check\n * - {@link validateEquals} — Also rejects properties not defined in `T`\n *\n * @template T Target type to validate against\n * @param input Value to validate\n * @returns {@link IValidation} <T> containing either `data` or `errors`\n */\nexport function validate<T>(input: T): IValidation<T>;\n\n/**\n * Validates type `T`.\n *\n * Unlike {@link assert} which throws on first error, this function continues\n * checking and collects all type mismatches into {@link IValidation.errors}\n * array. Never throws.\n *\n * Return structure:\n *\n * - `success: true` → `data` contains validated input as `T`\n * - `success: false` → `errors` array of {@link IValidation.IError} with `path`,\n * `expected`, `value`\n *\n * Related functions:\n *\n * - {@link assert} — Throws on first error instead of collecting all\n * - {@link is} — Simple boolean check\n * - {@link validateEquals} — Also rejects properties not defined in `T`\n *\n * @template T Target type to validate against\n * @param input Value to validate\n * @returns {@link IValidation} <T> containing either `data` or `errors`\n */\nexport function validate<T>(input: unknown): IValidation<T>;\n\n/** @internal */\nexport function validate(): never {\n NoTransformConfigurationError(\"validate\");\n}\n\n/* -----------------------------------------------------------\n STRICT VALIDATORS\n----------------------------------------------------------- */\n/**\n * Asserts type `T` with strict equality.\n *\n * Stricter than {@link assert}: also fails when input contains any property not\n * defined in type `T`. For extra property errors, `expected` will be\n * `\"undefined\"`.\n *\n * Related functions:\n *\n * - {@link assert} — Allows extra properties\n * - {@link equals} — Boolean result without throwing\n * - {@link validateEquals} — Collects all errors without throwing\n * - {@link assertGuardEquals} — Type guard version with no return value\n *\n * @template T Target type for exact match\n * @param input Value to validate\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns The input value typed as `T`\n * @throws {TypeGuardError} When type mismatch or extra property detected\n */\nexport function assertEquals<T>(\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): T;\n\n/**\n * Asserts type `T` with strict equality.\n *\n * Stricter than {@link assert}: also fails when input contains any property not\n * defined in type `T`. For extra property errors, `expected` will be\n * `\"undefined\"`.\n *\n * Related functions:\n *\n * - {@link assert} — Allows extra properties\n * - {@link equals} — Boolean result without throwing\n * - {@link validateEquals} — Collects all errors without throwing\n * - {@link assertGuardEquals} — Type guard version with no return value\n *\n * @template T Target type for exact match\n * @param input Value to validate\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns The input value typed as `T`\n * @throws {TypeGuardError} When type mismatch or extra property detected\n */\nexport function assertEquals<T>(\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): T;\n\n/** @internal */\nexport function assertEquals(): never {\n NoTransformConfigurationError(\"assertEquals\");\n}\n\n/**\n * Asserts type `T` with strict equality as assertion guard.\n *\n * Combines {@link assertGuard} with strict equality checking. Returns nothing\n * but narrows input to type `T`. Also fails when input contains properties not\n * in `T`.\n *\n * Related functions:\n *\n * - {@link assertGuard} — Allows extra properties\n * - {@link assertEquals} — Returns value instead of type guard\n * - {@link equals} — Boolean result without throwing\n * - {@link validateEquals} — Collects all errors without throwing\n *\n * @template T Target type for exact match\n * @param input Value to assert (narrowed to `T` after call)\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @throws {TypeGuardError} When type mismatch or extra property detected\n */\nexport function assertGuardEquals<T>(\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): asserts input is T;\n\n/**\n * Asserts type `T` with strict equality as assertion guard.\n *\n * Combines {@link assertGuard} with strict equality checking. Returns nothing\n * but narrows input to type `T`. Also fails when input contains properties not\n * in `T`.\n *\n * Related functions:\n *\n * - {@link assertGuard} — Allows extra properties\n * - {@link assertEquals} — Returns value instead of type guard\n * - {@link equals} — Boolean result without throwing\n * - {@link validateEquals} — Collects all errors without throwing\n *\n * @template T Target type for exact match\n * @param input Value to assert (narrowed to `T` after call)\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @throws {TypeGuardError} When type mismatch or extra property detected\n */\nexport function assertGuardEquals<T>(\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): asserts input is T;\n\n/** @internal */\nexport function assertGuardEquals(): never {\n NoTransformConfigurationError(\"assertGuardEquals\");\n}\n\n/**\n * Tests type `T` with strict equality.\n *\n * Stricter than {@link is}: also returns `false` when input contains any\n * property not defined in type `T`. Useful for detecting unexpected data or\n * typos.\n *\n * Related functions:\n *\n * - {@link is} — Allows extra properties\n * - {@link assertEquals} — Throws with detailed error info on mismatch\n * - {@link validateEquals} — Returns all errors without throwing\n *\n * @template T Target type for exact match\n * @param input Value to test\n * @returns `true` if valid, `false` otherwise (type predicate `input is T`)\n */\nexport function equals<T>(input: T): input is T;\n\n/**\n * Tests type `T` with strict equality.\n *\n * Stricter than {@link is}: also returns `false` when input contains any\n * property not defined in type `T`. Useful for detecting unexpected data or\n * typos.\n *\n * Related functions:\n *\n * - {@link is} — Allows extra properties\n * - {@link assertEquals} — Throws with detailed error info on mismatch\n * - {@link validateEquals} — Returns all errors without throwing\n *\n * @template T Target type for exact match\n * @param input Value to test\n * @returns `true` if valid, `false` otherwise (type predicate `input is T`)\n */\nexport function equals<T>(input: unknown): input is T;\n\n/** @internal */\nexport function equals(): never {\n NoTransformConfigurationError(\"equals\");\n}\n\n/**\n * Validates type `T` with strict equality.\n *\n * Combines {@link validate} with strict equality checking. Collects all errors\n * including extra property violations into {@link IValidation.errors} array.\n *\n * Return structure:\n *\n * - `success: true` → `data` contains validated input as `T`\n * - `success: false` → `errors` array with `path`, `expected`, `value` for each\n * mismatch\n *\n * Related functions:\n *\n * - {@link validate} — Allows extra properties\n * - {@link assertEquals} — Throws on first error\n * - {@link equals} — Simple boolean check\n *\n * @template T Target type for exact match\n * @param input Value to validate\n * @returns {@link IValidation} <T> containing either `data` or `errors`\n */\nexport function validateEquals<T>(input: T): IValidation<T>;\n\n/**\n * Validates type `T` with strict equality.\n *\n * Combines {@link validate} with strict equality checking. Collects all errors\n * including extra property violations into {@link IValidation.errors} array.\n *\n * Return structure:\n *\n * - `success: true` → `data` contains validated input as `T`\n * - `success: false` → `errors` array with `path`, `expected`, `value` for each\n * mismatch\n *\n * Related functions:\n *\n * - {@link validate} — Allows extra properties\n * - {@link assertEquals} — Throws on first error\n * - {@link equals} — Simple boolean check\n *\n * @template T Target type for exact match\n * @param input Value to validate\n * @returns {@link IValidation} <T> containing either `data` or `errors`\n */\nexport function validateEquals<T>(input: unknown): IValidation<T>;\n\n/** @internal */\nexport function validateEquals(): never {\n NoTransformConfigurationError(\"validateEquals\");\n}\n\n/* -----------------------------------------------------------\n RANDOM\n----------------------------------------------------------- */\n/**\n * Generates random data of type `T`.\n *\n * Creates random instance conforming to compile-time type `T`. Generates only\n * primitive data; methods in `T` are ignored. If `T` has `toJSON()` method,\n * generates its return type instead.\n *\n * @template T Type of data to generate\n * @param generator Custom random generator implementing {@link IRandomGenerator}\n * @returns Randomly generated data as `Resolved<T>`\n * @danger You must configure the generic argument `T`\n */\nexport function random(generator?: Partial<IRandomGenerator>): never;\n\n/**\n * Generates random data of type `T`.\n *\n * Creates random instance conforming to compile-time type `T`. Generates only\n * primitive data; methods in `T` are ignored. If `T` has `toJSON()` method,\n * generates its return type instead.\n *\n * @template T Type of data to generate\n * @param generator Custom random generator implementing {@link IRandomGenerator}\n * @returns Randomly generated data as `Resolved<T>`\n */\nexport function random<T>(generator?: Partial<IRandomGenerator>): Resolved<T>;\n\n/** @internal */\nexport function random(): never {\n NoTransformConfigurationError(\"random\");\n}\n\n/* -----------------------------------------------------------\n FACTORY FUNCTIONS\n----------------------------------------------------------- */\n/**\n * Creates reusable {@link assert} function.\n *\n * Returns a function that can be called multiple times without recompilation.\n * Useful when the same type validation is needed repeatedly.\n *\n * @template T Target type to validate against\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable assert function `(input: unknown, errorFactory?) => T`\n * @danger You must configure the generic argument `T`\n */\nexport function createAssert(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assert} function.\n *\n * Returns a function that can be called multiple times without recompilation.\n * Useful when the same type validation is needed repeatedly.\n *\n * @template T Target type to validate against\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable assert function `(input: unknown, errorFactory?) => T`,\n * whose own `errorFactory` overrides this one for that single call\n */\nexport function createAssert<T>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n) => T;\n\n/** @internal */\nexport function createAssert<T>(): (\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n) => T {\n NoTransformConfigurationError(\"createAssert\");\n}\n\n/**\n * Creates reusable {@link assertGuard} function.\n *\n * Returns a reusable type guard assertion function.\n *\n * TypeScript requirement: You must declare the variable type explicitly. `const\n * fn: AssertionGuard<T> = createAssertGuard<T>()` — otherwise compile error.\n * That annotation is one parameter wide, so it also hides the call-time\n * `errorFactory`; annotate with `(input: unknown, errorFactory?: (props:\n * TypeGuardError.IProps) => Error) => asserts input is T` when you need it.\n *\n * @template T Target type to validate against\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable assertion guard function\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertGuard(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertGuard} function.\n *\n * Returns a reusable type guard assertion function.\n *\n * TypeScript requirement: You must declare the variable type explicitly. `const\n * fn: AssertionGuard<T> = createAssertGuard<T>()` — otherwise compile error.\n * That annotation is one parameter wide, so it also hides the call-time\n * `errorFactory`; annotate with `(input: unknown, errorFactory?: (props:\n * TypeGuardError.IProps) => Error) => asserts input is T` when you need it.\n *\n * @template T Target type to validate against\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable assertion guard function, whose own `errorFactory`\n * overrides this one for that single call\n */\nexport function createAssertGuard<T>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n) => asserts input is T;\n\n/** @internal */\nexport function createAssertGuard<T>(): (\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n) => asserts input is T {\n NoTransformConfigurationError(\"createAssertGuard\");\n}\n\n/**\n * Creates reusable {@link is} function.\n *\n * Returns a type guard function that can be called multiple times without\n * recompilation.\n *\n * @template T Target type to check\n * @returns Reusable type guard function `(input: unknown) => input is T`\n * @danger You must configure the generic argument `T`\n */\nexport function createIs(): never;\n\n/**\n * Creates reusable {@link is} function.\n *\n * Returns a type guard function that can be called multiple times without\n * recompilation.\n *\n * @template T Target type to check\n * @returns Reusable type guard function `(input: unknown) => input is T`\n */\nexport function createIs<T>(): (input: unknown) => input is T;\n\n/** @internal */\nexport function createIs<T>(): (input: unknown) => input is T {\n NoTransformConfigurationError(\"createIs\");\n}\n\n/**\n * Creates reusable {@link shallow} function.\n *\n * Returns a depth-limited type guard function that can be called multiple times\n * without recompilation.\n *\n * @template T Target type to check\n * @template N Maximum depth to descend before accepting a value structurally.\n * Must be a non-negative integer literal. Defaults to `2`.\n * @returns Reusable type guard function `(input: unknown) => input is T`\n * @danger You must configure the generic argument `T`\n */\nexport function createShallow(): never;\n\n/**\n * Creates reusable {@link shallow} function.\n *\n * Returns a depth-limited type guard function that can be called multiple times\n * without recompilation.\n *\n * @template T Target type to check\n * @template N Maximum depth to descend before accepting a value structurally.\n * Must be a non-negative integer literal. Defaults to `2`.\n * @returns Reusable type guard function `(input: unknown) => input is T`\n */\nexport function createShallow<T, N extends number = 2>(): (\n input: unknown,\n) => input is T;\n\n/** @internal */\nexport function createShallow<T>(): (input: unknown) => input is T {\n NoTransformConfigurationError(\"createShallow\");\n}\n\n/**\n * Creates reusable {@link validate} function.\n *\n * Returns a validation function that can be called multiple times without\n * recompilation. Also implements {@link StandardSchemaV1} interface for\n * interoperability.\n *\n * @template T Target type to validate against\n * @returns Reusable validate function `(input: unknown) => IValidation<T>`\n * @danger You must configure the generic argument `T`\n */\nexport function createValidate(): never;\n\n/**\n * Creates reusable {@link validate} function.\n *\n * Returns a validation function that can be called multiple times without\n * recompilation. Also implements {@link StandardSchemaV1} interface for\n * interoperability.\n *\n * @template T Target type to validate against\n * @returns Reusable validate function `(input: unknown) => IValidation<T>`\n */\nexport function createValidate<T>(): ((input: unknown) => IValidation<T>) &\n StandardSchemaV1<T, T>;\n\n/** @internal */\nexport function createValidate(): ((input: unknown) => IValidation) &\n StandardSchemaV1<unknown, unknown> {\n NoTransformConfigurationError(\"createValidate\");\n}\n\n/**\n * Creates reusable {@link assertEquals} function.\n *\n * Returns a strict assertion function that rejects superfluous properties. Can\n * be called multiple times without recompilation.\n *\n * @template T Target type for exact match\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable assertEquals function `(input: unknown, errorFactory?) =>\n * T`\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertEquals(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertEquals} function.\n *\n * Returns a strict assertion function that rejects superfluous properties. Can\n * be called multiple times without recompilation.\n *\n * @template T Target type for exact match\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable assertEquals function `(input: unknown, errorFactory?) =>\n * T`, whose own `errorFactory` overrides this one for that single call\n */\nexport function createAssertEquals<T>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n) => T;\n\n/** @internal */\nexport function createAssertEquals<T>(): (\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n) => T {\n NoTransformConfigurationError(\"createAssertEquals\");\n}\n\n/**\n * Creates reusable {@link assertGuardEquals} function.\n *\n * Returns a strict assertion guard that rejects superfluous properties.\n *\n * TypeScript requirement: You must declare the variable type explicitly. `const\n * fn: AssertionGuard<T> = createAssertGuardEquals<T>()` — otherwise compile\n * error. That annotation is one parameter wide, so it also hides the call-time\n * `errorFactory`; annotate with `(input: unknown, errorFactory?: (props:\n * TypeGuardError.IProps) => Error) => asserts input is T` when you need it.\n *\n * @template T Target type for exact match\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable assertion guard function\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertGuardEquals(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertGuardEquals} function.\n *\n * Returns a strict assertion guard that rejects superfluous properties.\n *\n * TypeScript requirement: You must declare the variable type explicitly. `const\n * fn: AssertionGuard<T> = createAssertGuardEquals<T>()` — otherwise compile\n * error. That annotation is one parameter wide, so it also hides the call-time\n * `errorFactory`; annotate with `(input: unknown, errorFactory?: (props:\n * TypeGuardError.IProps) => Error) => asserts input is T` when you need it.\n *\n * @template T Target type for exact match\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable assertion guard function, whose own `errorFactory`\n * overrides this one for that single call\n */\nexport function createAssertGuardEquals<T>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n) => asserts input is T;\n\n/** @internal */\nexport function createAssertGuardEquals<T>(): (\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n) => asserts input is T {\n NoTransformConfigurationError(\"createAssertGuardEquals\");\n}\n\n/**\n * Creates reusable {@link equals} function.\n *\n * Returns a strict type guard that rejects superfluous properties. Can be\n * called multiple times without recompilation.\n *\n * @template T Target type for exact match\n * @returns Reusable type guard function `(input: unknown) => input is T`\n * @danger You must configure the generic argument `T`\n */\nexport function createEquals(): never;\n\n/**\n * Creates reusable {@link equals} function.\n *\n * Returns a strict type guard that rejects superfluous properties. Can be\n * called multiple times without recompilation.\n *\n * @template T Target type for exact match\n * @returns Reusable type guard function `(input: unknown) => input is T`\n */\nexport function createEquals<T>(): (input: unknown) => input is T;\n\n/** @internal */\nexport function createEquals<T>(): (input: unknown) => input is T {\n NoTransformConfigurationError(\"createEquals\");\n}\n\n/**\n * Creates reusable {@link validateEquals} function.\n *\n * Returns a strict validation function that rejects superfluous properties.\n * Also implements {@link StandardSchemaV1} interface for interoperability.\n *\n * @template T Target type for exact match\n * @returns Reusable validateEquals function `(input: unknown) =>\n * IValidation<T>`\n * @danger You must configure the generic argument `T`\n */\nexport function createValidateEquals(): never;\n\n/**\n * Creates reusable {@link validateEquals} function.\n *\n * Returns a strict validation function that rejects superfluous properties.\n * Also implements {@link StandardSchemaV1} interface for interoperability.\n *\n * @template T Target type for exact match\n * @returns Reusable validateEquals function `(input: unknown) =>\n * IValidation<T>`\n */\nexport function createValidateEquals<T>(): ((\n input: unknown,\n) => IValidation<T>) &\n StandardSchemaV1<T, T>;\n\n/** @internal */\nexport function createValidateEquals(): ((input: unknown) => IValidation) &\n StandardSchemaV1<unknown, unknown> {\n NoTransformConfigurationError(\"createValidateEquals\");\n}\n\n/**\n * Creates reusable {@link random} function.\n *\n * Returns a random data generator that can be called multiple times without\n * recompilation.\n *\n * @template T Type of data to generate\n * @param generator Custom random generator implementing {@link IRandomGenerator}\n * @returns Reusable random function `() => Resolved<T>`\n * @danger You must configure the generic argument `T`\n */\nexport function createRandom(generator?: Partial<IRandomGenerator>): never;\n\n/**\n * Creates reusable {@link random} function.\n *\n * Returns a random data generator that can be called multiple times without\n * recompilation.\n *\n * @template T Type of data to generate\n * @param generator Custom random generator implementing {@link IRandomGenerator}\n * @returns Reusable random function `() => Resolved<T>`\n */\nexport function createRandom<T>(\n generator?: Partial<IRandomGenerator>,\n): () => Resolved<T>;\n\n/** @internal */\nexport function createRandom(): never {\n NoTransformConfigurationError(\"createRandom\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFA,SAAgB,SAAgB;CAC9B,8BAA8B,QAAQ;AACxC;;AA6DA,SAAgB,cAAqB;CACnC,8BAA8B,aAAa;AAC7C;;AA2CA,SAAgB,KAAY;CAC1B,8BAA8B,IAAI;AACpC;;AAiEA,SAAgB,UAAiB;CAC/B,8BAA8B,SAAS;AACzC;;AAqDA,SAAgB,WAAkB;CAChC,8BAA8B,UAAU;AAC1C;;AA0DA,SAAgB,eAAsB;CACpC,8BAA8B,cAAc;AAC9C;;AAqDA,SAAgB,oBAA2B;CACzC,8BAA8B,mBAAmB;AACnD;;AAyCA,SAAgB,SAAgB;CAC9B,8BAA8B,QAAQ;AACxC;;AAmDA,SAAgB,iBAAwB;CACtC,8BAA8B,gBAAgB;AAChD;;AAiCA,SAAgB,SAAgB;CAC9B,8BAA8B,QAAQ;AACxC;;AAyCA,SAAgB,eAGT;CACL,8BAA8B,cAAc;AAC9C;;AAgDA,SAAgB,oBAGQ;CACtB,8BAA8B,mBAAmB;AACnD;;AA0BA,SAAgB,WAA8C;CAC5D,8BAA8B,UAAU;AAC1C;;AAgCA,SAAgB,gBAAmD;CACjE,8BAA8B,eAAe;AAC/C;;AA6BA,SAAgB,iBACqB;CACnC,8BAA8B,gBAAgB;AAChD;;AAuCA,SAAgB,qBAGT;CACL,8BAA8B,oBAAoB;AACpD;;AAgDA,SAAgB,0BAGQ;CACtB,8BAA8B,yBAAyB;AACzD;;AA0BA,SAAgB,eAAkD;CAChE,8BAA8B,cAAc;AAC9C;;AA+BA,SAAgB,uBACqB;CACnC,8BAA8B,sBAAsB;AACtD;;AA8BA,SAAgB,eAAsB;CACpC,8BAA8B,cAAc;AAC9C"}
|
package/lib/notations.d.ts
CHANGED
|
@@ -331,7 +331,7 @@ export declare function createAssertCamel(errorFactory?: undefined | ((props: Ty
|
|
|
331
331
|
* {@link TypeGuardError.IProps}
|
|
332
332
|
* @returns Reusable conversion function
|
|
333
333
|
*/
|
|
334
|
-
export declare function createAssertCamel<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: T) => CamelCase<T>;
|
|
334
|
+
export declare function createAssertCamel<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)) => CamelCase<T>;
|
|
335
335
|
/**
|
|
336
336
|
* Creates reusable {@link isCamel} function.
|
|
337
337
|
*
|
|
@@ -385,7 +385,7 @@ export declare function createAssertPascal(errorFactory?: undefined | ((props: T
|
|
|
385
385
|
* {@link TypeGuardError.IProps}
|
|
386
386
|
* @returns Reusable conversion function
|
|
387
387
|
*/
|
|
388
|
-
export declare function createAssertPascal<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: T) => PascalCase<T>;
|
|
388
|
+
export declare function createAssertPascal<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)) => PascalCase<T>;
|
|
389
389
|
/**
|
|
390
390
|
* Creates reusable {@link isPascal} function.
|
|
391
391
|
*
|
|
@@ -439,7 +439,7 @@ export declare function createAssertSnake(errorFactory?: undefined | ((props: Ty
|
|
|
439
439
|
* {@link TypeGuardError.IProps}
|
|
440
440
|
* @returns Reusable conversion function
|
|
441
441
|
*/
|
|
442
|
-
export declare function createAssertSnake<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: T) => SnakeCase<T>;
|
|
442
|
+
export declare function createAssertSnake<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)) => SnakeCase<T>;
|
|
443
443
|
/**
|
|
444
444
|
* Creates reusable {@link isSnake} function.
|
|
445
445
|
*
|
|
@@ -493,7 +493,7 @@ export declare function createAssertKebab(errorFactory?: undefined | ((props: Ty
|
|
|
493
493
|
* {@link TypeGuardError.IProps}
|
|
494
494
|
* @returns Reusable conversion function
|
|
495
495
|
*/
|
|
496
|
-
export declare function createAssertKebab<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: T) => KebabCase<T>;
|
|
496
|
+
export declare function createAssertKebab<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)) => KebabCase<T>;
|
|
497
497
|
/**
|
|
498
498
|
* Creates reusable {@link isKebab} function.
|
|
499
499
|
*
|
package/lib/notations.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notations.js","sourceRoot":"","sources":["../src/notations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,gGAA6F;AAkC7F,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,iBAAiB,CAAC,CAAC;AAC1D,CAAC;AAgCD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,uBAAuB,CAAC,CAAC;AAChE,CAAC;AAuBD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AAC5D,CAAC;AAwBD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,yBAAyB,CAAC,CAAC;AAClE,CAAC;AA2BD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,kBAAkB,CAAC,CAAC;AAC3D,CAAC;AAgCD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,wBAAwB,CAAC,CAAC;AACjE,CAAC;AAuBD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,oBAAoB,CAAC,CAAC;AAC7D,CAAC;AAwBD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,0BAA0B,CAAC,CAAC;AACnE,CAAC;AA2BD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,iBAAiB,CAAC,CAAC;AAC1D,CAAC;AAgCD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,uBAAuB,CAAC,CAAC;AAChE,CAAC;AAuBD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AAC5D,CAAC;AAwBD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,yBAAyB,CAAC,CAAC;AAClE,CAAC;AA2BD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,iBAAiB,CAAC,CAAC;AAC1D,CAAC;AAgCD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,uBAAuB,CAAC,CAAC;AAChE,CAAC;AAuBD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AAC5D,CAAC;AAwBD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,yBAAyB,CAAC,CAAC;AAClE,CAAC;AAoBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,uBAAuB,CAAC,CAAC;AACzD,CAAC;
|
|
1
|
+
{"version":3,"file":"notations.js","sourceRoot":"","sources":["../src/notations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,gGAA6F;AAkC7F,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,iBAAiB,CAAC,CAAC;AAC1D,CAAC;AAgCD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,uBAAuB,CAAC,CAAC;AAChE,CAAC;AAuBD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AAC5D,CAAC;AAwBD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,yBAAyB,CAAC,CAAC;AAClE,CAAC;AA2BD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,kBAAkB,CAAC,CAAC;AAC3D,CAAC;AAgCD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,wBAAwB,CAAC,CAAC;AACjE,CAAC;AAuBD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,oBAAoB,CAAC,CAAC;AAC7D,CAAC;AAwBD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,0BAA0B,CAAC,CAAC;AACnE,CAAC;AA2BD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,iBAAiB,CAAC,CAAC;AAC1D,CAAC;AAgCD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,uBAAuB,CAAC,CAAC;AAChE,CAAC;AAuBD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AAC5D,CAAC;AAwBD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,yBAAyB,CAAC,CAAC;AAClE,CAAC;AA2BD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,iBAAiB,CAAC,CAAC;AAC1D,CAAC;AAgCD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,uBAAuB,CAAC,CAAC;AAChE,CAAC;AAuBD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AAC5D,CAAC;AAwBD,gBAAgB;AAChB;IACE,OAAO,IAAA,6DAA6B,EAAC,yBAAyB,CAAC,CAAC;AAClE,CAAC;AAoBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,uBAAuB,CAAC,CAAC;AACzD,CAAC;AA0BD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,6BAA6B,CAAC,CAAC;AAC/D,CAAC;AAiBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,yBAAyB,CAAC,CAAC;AAC3D,CAAC;AAmBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,+BAA+B,CAAC,CAAC;AACjE,CAAC;AAiBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,wBAAwB,CAAC,CAAC;AAC1D,CAAC;AA0BD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,8BAA8B,CAAC,CAAC;AAChE,CAAC;AAiBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,0BAA0B,CAAC,CAAC;AAC5D,CAAC;AAmBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,gCAAgC,CAAC,CAAC;AAClE,CAAC;AAiBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,uBAAuB,CAAC,CAAC;AACzD,CAAC;AA0BD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,6BAA6B,CAAC,CAAC;AAC/D,CAAC;AAiBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,yBAAyB,CAAC,CAAC;AAC3D,CAAC;AAmBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,+BAA+B,CAAC,CAAC;AACjE,CAAC;AAiBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,uBAAuB,CAAC,CAAC;AACzD,CAAC;AA0BD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,6BAA6B,CAAC,CAAC;AAC/D,CAAC;AAiBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,yBAAyB,CAAC,CAAC;AAC3D,CAAC;AAmBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,+BAA+B,CAAC,CAAC;AACjE,CAAC"}
|
package/lib/notations.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notations.mjs","names":[],"sources":["../src/notations.ts"],"sourcesContent":["import {\n CamelCase,\n IValidation,\n KebabCase,\n PascalCase,\n SnakeCase,\n} from \"@typia/interface\";\n\nimport { TypeGuardError } from \"./TypeGuardError\";\nimport { NoTransformConfigurationError } from \"./transformers/NoTransformConfigurationError\";\n\n/* ===========================================================\n NOTATIONS (NAMING CONVENTIONS)\n - CAMEL CASE\n - PASCAL CASE\n - SNAKE CASE\n - KEBAB CASE\n - FACTORY FUNCTIONS\n==============================================================\n CAMEL CASE\n----------------------------------------------------------- */\n/**\n * Converts property names to camelCase.\n *\n * Transforms all property names in the object (including nested) to camelCase\n * convention. Creates a new object with renamed properties. Distinct source\n * keys that become the same destination key are rejected with an error instead\n * of silently discarding a value. This collision policy also applies to the\n * assert, is, validate, and factory variants.\n *\n * Does not validate the input. For validation, use:\n *\n * - {@link assertCamel} — Throws on type mismatch\n * - {@link isCamel} — Returns `null` on type mismatch\n * - {@link validateCamel} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns New object with camelCase property names\n * @throws {Error} When two source keys become the same destination key\n */\nexport function camel<T>(input: T): CamelCase<T>;\n\n/** @internal */\nexport function camel(): never {\n return NoTransformConfigurationError(\"notations.camel\");\n}\n\n/**\n * Converts property names to camelCase with assertion.\n *\n * Transforms all property names to camelCase with {@link assert} validation.\n * Throws {@link TypeGuardError} on type mismatch.\n *\n * Related functions:\n *\n * - {@link camel} — No validation\n * - {@link isCamel} — Returns `null` instead of throwing\n * - {@link validateCamel} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns New object with camelCase property names\n * @throws {TypeGuardError} When input doesn't conform to type `T`\n */\nexport function assertCamel<T>(\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): CamelCase<T>;\n\n/** @internal */\nexport function assertCamel<T>(\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): CamelCase<T>;\n\n/** @internal */\nexport function assertCamel(): never {\n return NoTransformConfigurationError(\"notations.assertCamel\");\n}\n\n/**\n * Converts property names to camelCase with type checking.\n *\n * Transforms all property names to camelCase with {@link is} validation. Returns\n * `null` on type mismatch.\n *\n * Related functions:\n *\n * - {@link camel} — No validation\n * - {@link assertCamel} — Throws instead of returning `null`\n * - {@link validateCamel} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns New object with camelCase property names, or `null` if invalid\n */\nexport function isCamel<T>(input: T): CamelCase<T> | null;\n\n/** @internal */\nexport function isCamel<T>(input: unknown): CamelCase<T> | null;\n\n/** @internal */\nexport function isCamel(): never {\n return NoTransformConfigurationError(\"notations.isCamel\");\n}\n\n/**\n * Converts property names to camelCase with validation.\n *\n * Transforms all property names to camelCase with {@link validate} validation.\n * Returns {@link IValidation.IFailure} with all errors on mismatch, or\n * {@link IValidation.ISuccess} with converted object.\n *\n * Related functions:\n *\n * - {@link camel} — No validation\n * - {@link assertCamel} — Throws on first error\n * - {@link isCamel} — Returns `null` instead of error details\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns Validation result containing converted object or errors\n */\nexport function validateCamel<T>(input: T): IValidation<CamelCase<T>>;\n\n/** @internal */\nexport function validateCamel<T>(input: unknown): IValidation<CamelCase<T>>;\n\n/** @internal */\nexport function validateCamel(): never {\n return NoTransformConfigurationError(\"notations.validateCamel\");\n}\n\n/* -----------------------------------------------------------\n PASCAL CASE\n----------------------------------------------------------- */\n/**\n * Converts property names to PascalCase.\n *\n * Transforms all property names in the object (including nested) to PascalCase\n * convention. Creates a new object with renamed properties. Distinct source\n * keys that become the same destination key are rejected with an error instead\n * of silently discarding a value. This collision policy also applies to the\n * assert, is, validate, and factory variants.\n *\n * Does not validate the input. For validation, use:\n *\n * - {@link assertPascal} — Throws on type mismatch\n * - {@link isPascal} — Returns `null` on type mismatch\n * - {@link validatePascal} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns New object with PascalCase property names\n * @throws {Error} When two source keys become the same destination key\n */\nexport function pascal<T>(input: T): PascalCase<T>;\n\n/** @internal */\nexport function pascal(): never {\n return NoTransformConfigurationError(\"notations.pascal\");\n}\n\n/**\n * Converts property names to PascalCase with assertion.\n *\n * Transforms all property names to PascalCase with {@link assert} validation.\n * Throws {@link TypeGuardError} on type mismatch.\n *\n * Related functions:\n *\n * - {@link pascal} — No validation\n * - {@link isPascal} — Returns `null` instead of throwing\n * - {@link validatePascal} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns New object with PascalCase property names\n * @throws {TypeGuardError} When input doesn't conform to type `T`\n */\nexport function assertPascal<T>(\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): PascalCase<T>;\n\n/** @internal */\nexport function assertPascal<T>(\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): PascalCase<T>;\n\n/** @internal */\nexport function assertPascal(): never {\n return NoTransformConfigurationError(\"notations.assertPascal\");\n}\n\n/**\n * Converts property names to PascalCase with type checking.\n *\n * Transforms all property names to PascalCase with {@link is} validation.\n * Returns `null` on type mismatch.\n *\n * Related functions:\n *\n * - {@link pascal} — No validation\n * - {@link assertPascal} — Throws instead of returning `null`\n * - {@link validatePascal} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns New object with PascalCase property names, or `null` if invalid\n */\nexport function isPascal<T>(input: T): PascalCase<T> | null;\n\n/** @internal */\nexport function isPascal<T>(input: unknown): PascalCase<T> | null;\n\n/** @internal */\nexport function isPascal(): never {\n return NoTransformConfigurationError(\"notations.isPascal\");\n}\n\n/**\n * Converts property names to PascalCase with validation.\n *\n * Transforms all property names to PascalCase with {@link validate} validation.\n * Returns {@link IValidation.IFailure} with all errors on mismatch, or\n * {@link IValidation.ISuccess} with converted object.\n *\n * Related functions:\n *\n * - {@link pascal} — No validation\n * - {@link assertPascal} — Throws on first error\n * - {@link isPascal} — Returns `null` instead of error details\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns Validation result containing converted object or errors\n */\nexport function validatePascal<T>(input: T): IValidation<PascalCase<T>>;\n\n/** @internal */\nexport function validatePascal<T>(input: unknown): IValidation<PascalCase<T>>;\n\n/** @internal */\nexport function validatePascal(): never {\n return NoTransformConfigurationError(\"notations.validatePascal\");\n}\n\n/* -----------------------------------------------------------\n SNAKE CASE\n----------------------------------------------------------- */\n/**\n * Converts property names to snake_case.\n *\n * Transforms all property names in the object (including nested) to snake_case\n * convention. Creates a new object with renamed properties. Distinct source\n * keys that become the same destination key are rejected with an error instead\n * of silently discarding a value. This collision policy also applies to the\n * assert, is, validate, and factory variants.\n *\n * Does not validate the input. For validation, use:\n *\n * - {@link assertSnake} — Throws on type mismatch\n * - {@link isSnake} — Returns `null` on type mismatch\n * - {@link validateSnake} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns New object with snake_case property names\n * @throws {Error} When two source keys become the same destination key\n */\nexport function snake<T>(input: T): SnakeCase<T>;\n\n/** @internal */\nexport function snake(): never {\n return NoTransformConfigurationError(\"notations.snake\");\n}\n\n/**\n * Converts property names to snake_case with assertion.\n *\n * Transforms all property names to snake_case with {@link assert} validation.\n * Throws {@link TypeGuardError} on type mismatch.\n *\n * Related functions:\n *\n * - {@link snake} — No validation\n * - {@link isSnake} — Returns `null` instead of throwing\n * - {@link validateSnake} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns New object with snake_case property names\n * @throws {TypeGuardError} When input doesn't conform to type `T`\n */\nexport function assertSnake<T>(\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): SnakeCase<T>;\n\n/** @internal */\nexport function assertSnake<T>(\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): SnakeCase<T>;\n\n/** @internal */\nexport function assertSnake(): never {\n return NoTransformConfigurationError(\"notations.assertSnake\");\n}\n\n/**\n * Converts property names to snake_case with type checking.\n *\n * Transforms all property names to snake_case with {@link is} validation.\n * Returns `null` on type mismatch.\n *\n * Related functions:\n *\n * - {@link snake} — No validation\n * - {@link assertSnake} — Throws instead of returning `null`\n * - {@link validateSnake} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns New object with snake_case property names, or `null` if invalid\n */\nexport function isSnake<T>(input: T): SnakeCase<T> | null;\n\n/** @internal */\nexport function isSnake<T>(input: unknown): SnakeCase<T> | null;\n\n/** @internal */\nexport function isSnake(): never {\n return NoTransformConfigurationError(\"notations.isSnake\");\n}\n\n/**\n * Converts property names to snake_case with validation.\n *\n * Transforms all property names to snake_case with {@link validate} validation.\n * Returns {@link IValidation.IFailure} with all errors on mismatch, or\n * {@link IValidation.ISuccess} with converted object.\n *\n * Related functions:\n *\n * - {@link snake} — No validation\n * - {@link assertSnake} — Throws on first error\n * - {@link isSnake} — Returns `null` instead of error details\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns Validation result containing converted object or errors\n */\nexport function validateSnake<T>(input: T): IValidation<SnakeCase<T>>;\n\n/** @internal */\nexport function validateSnake<T>(input: unknown): IValidation<SnakeCase<T>>;\n\n/** @internal */\nexport function validateSnake(): never {\n return NoTransformConfigurationError(\"notations.validateSnake\");\n}\n\n/* -----------------------------------------------------------\n KEBAB CASE\n----------------------------------------------------------- */\n/**\n * Converts property names to kebab-case.\n *\n * Transforms all property names in the object (including nested) to kebab-case\n * convention. Creates a new object with renamed properties. Distinct source\n * keys that become the same destination key are rejected with an error instead\n * of silently discarding a value. This collision policy also applies to the\n * assert, is, validate, and factory variants.\n *\n * Does not validate the input. For validation, use:\n *\n * - {@link assertKebab} — Throws on type mismatch\n * - {@link isKebab} — Returns `null` on type mismatch\n * - {@link validateKebab} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns New object with kebab-case property names\n * @throws {Error} When two source keys become the same destination key\n */\nexport function kebab<T>(input: T): KebabCase<T>;\n\n/** @internal */\nexport function kebab(): never {\n return NoTransformConfigurationError(\"notations.kebab\");\n}\n\n/**\n * Converts property names to kebab-case with assertion.\n *\n * Transforms all property names to kebab-case with {@link assert} validation.\n * Throws {@link TypeGuardError} on type mismatch.\n *\n * Related functions:\n *\n * - {@link kebab} — No validation\n * - {@link isKebab} — Returns `null` instead of throwing\n * - {@link validateKebab} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns New object with kebab-case property names\n * @throws {TypeGuardError} When input doesn't conform to type `T`\n */\nexport function assertKebab<T>(\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): KebabCase<T>;\n\n/** @internal */\nexport function assertKebab<T>(\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): KebabCase<T>;\n\n/** @internal */\nexport function assertKebab(): never {\n return NoTransformConfigurationError(\"notations.assertKebab\");\n}\n\n/**\n * Converts property names to kebab-case with type checking.\n *\n * Transforms all property names to kebab-case with {@link is} validation.\n * Returns `null` on type mismatch.\n *\n * Related functions:\n *\n * - {@link kebab} — No validation\n * - {@link assertKebab} — Throws instead of returning `null`\n * - {@link validateKebab} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns New object with kebab-case property names, or `null` if invalid\n */\nexport function isKebab<T>(input: T): KebabCase<T> | null;\n\n/** @internal */\nexport function isKebab<T>(input: unknown): KebabCase<T> | null;\n\n/** @internal */\nexport function isKebab(): never {\n return NoTransformConfigurationError(\"notations.isKebab\");\n}\n\n/**\n * Converts property names to kebab-case with validation.\n *\n * Transforms all property names to kebab-case with {@link validate} validation.\n * Returns {@link IValidation.IFailure} with all errors on mismatch, or\n * {@link IValidation.ISuccess} with converted object.\n *\n * Related functions:\n *\n * - {@link kebab} — No validation\n * - {@link assertKebab} — Throws on first error\n * - {@link isKebab} — Returns `null` instead of error details\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns Validation result containing converted object or errors\n */\nexport function validateKebab<T>(input: T): IValidation<KebabCase<T>>;\n\n/** @internal */\nexport function validateKebab<T>(input: unknown): IValidation<KebabCase<T>>;\n\n/** @internal */\nexport function validateKebab(): never {\n return NoTransformConfigurationError(\"notations.validateKebab\");\n}\n\n/* -----------------------------------------------------------\n FACTORY FUNCTIONS\n----------------------------------------------------------- */\n/**\n * Creates reusable {@link camel} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createCamel(): never;\n\n/**\n * Creates reusable {@link camel} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createCamel<T>(): (input: T) => CamelCase<T>;\n\n/** @internal */\nexport function createCamel(): never {\n NoTransformConfigurationError(\"notations.createCamel\");\n}\n\n/**\n * Creates reusable {@link assertCamel} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertCamel(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertCamel} function.\n *\n * @template T Type of input value\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable conversion function\n */\nexport function createAssertCamel<T>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (input: T) => CamelCase<T>;\n\n/** @internal */\nexport function createAssertCamel(): never {\n NoTransformConfigurationError(\"notations.createAssertCamel\");\n}\n\n/**\n * Creates reusable {@link isCamel} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createIsCamel(): never;\n\n/**\n * Creates reusable {@link isCamel} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createIsCamel<T>(): (input: T) => CamelCase<T> | null;\n\n/** @internal */\nexport function createIsCamel(): never {\n NoTransformConfigurationError(\"notations.createIsCamel\");\n}\n\n/**\n * Creates reusable {@link validateCamel} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createValidateCamel(): never;\n\n/**\n * Creates reusable {@link validateCamel} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createValidateCamel<T>(): (\n input: T,\n) => IValidation<CamelCase<T>>;\n\n/** @internal */\nexport function createValidateCamel(): never {\n NoTransformConfigurationError(\"notations.createValidateCamel\");\n}\n\n/**\n * Creates reusable {@link pascal} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createPascal(): never;\n\n/**\n * Creates reusable {@link pascal} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createPascal<T>(): (input: T) => PascalCase<T>;\n\n/** @internal */\nexport function createPascal(): never {\n NoTransformConfigurationError(\"notations.createPascal\");\n}\n\n/**\n * Creates reusable {@link assertPascal} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertPascal(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertPascal} function.\n *\n * @template T Type of input value\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable conversion function\n */\nexport function createAssertPascal<T>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (input: T) => PascalCase<T>;\n\n/** @internal */\nexport function createAssertPascal(): never {\n NoTransformConfigurationError(\"notations.createAssertPascal\");\n}\n\n/**\n * Creates reusable {@link isPascal} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createIsPascal(): never;\n\n/**\n * Creates reusable {@link isPascal} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createIsPascal<T>(): (input: T) => PascalCase<T> | null;\n\n/** @internal */\nexport function createIsPascal(): never {\n NoTransformConfigurationError(\"notations.createIsPascal\");\n}\n\n/**\n * Creates reusable {@link validatePascal} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createValidatePascal(): never;\n\n/**\n * Creates reusable {@link validatePascal} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createValidatePascal<T>(): (\n input: T,\n) => IValidation<PascalCase<T>>;\n\n/** @internal */\nexport function createValidatePascal(): never {\n NoTransformConfigurationError(\"notations.createValidatePascal\");\n}\n\n/**\n * Creates reusable {@link snake} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createSnake(): never;\n\n/**\n * Creates reusable {@link snake} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createSnake<T>(): (input: T) => SnakeCase<T>;\n\n/** @internal */\nexport function createSnake(): never {\n NoTransformConfigurationError(\"notations.createSnake\");\n}\n\n/**\n * Creates reusable {@link assertSnake} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertSnake(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertSnake} function.\n *\n * @template T Type of input value\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable conversion function\n */\nexport function createAssertSnake<T>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (input: T) => SnakeCase<T>;\n\n/** @internal */\nexport function createAssertSnake(): never {\n NoTransformConfigurationError(\"notations.createAssertSnake\");\n}\n\n/**\n * Creates reusable {@link isSnake} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createIsSnake(): never;\n\n/**\n * Creates reusable {@link isSnake} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createIsSnake<T>(): (input: T) => SnakeCase<T> | null;\n\n/** @internal */\nexport function createIsSnake(): never {\n NoTransformConfigurationError(\"notations.createIsSnake\");\n}\n\n/**\n * Creates reusable {@link validateSnake} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createValidateSnake(): never;\n\n/**\n * Creates reusable {@link validateSnake} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createValidateSnake<T>(): (\n input: T,\n) => IValidation<SnakeCase<T>>;\n\n/** @internal */\nexport function createValidateSnake(): never {\n NoTransformConfigurationError(\"notations.createValidateSnake\");\n}\n\n/**\n * Creates reusable {@link kebab} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createKebab(): never;\n\n/**\n * Creates reusable {@link kebab} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createKebab<T>(): (input: T) => KebabCase<T>;\n\n/** @internal */\nexport function createKebab(): never {\n NoTransformConfigurationError(\"notations.createKebab\");\n}\n\n/**\n * Creates reusable {@link assertKebab} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertKebab(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertKebab} function.\n *\n * @template T Type of input value\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable conversion function\n */\nexport function createAssertKebab<T>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (input: T) => KebabCase<T>;\n\n/** @internal */\nexport function createAssertKebab(): never {\n NoTransformConfigurationError(\"notations.createAssertKebab\");\n}\n\n/**\n * Creates reusable {@link isKebab} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createIsKebab(): never;\n\n/**\n * Creates reusable {@link isKebab} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createIsKebab<T>(): (input: T) => KebabCase<T> | null;\n\n/** @internal */\nexport function createIsKebab(): never {\n NoTransformConfigurationError(\"notations.createIsKebab\");\n}\n\n/**\n * Creates reusable {@link validateKebab} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createValidateKebab(): never;\n\n/**\n * Creates reusable {@link validateKebab} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createValidateKebab<T>(): (\n input: T,\n) => IValidation<KebabCase<T>>;\n\n/** @internal */\nexport function createValidateKebab(): never {\n NoTransformConfigurationError(\"notations.createValidateKebab\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,SAAgB,QAAe;CAC7B,OAAO,8BAA8B,iBAAiB;AACxD;;AAiCA,SAAgB,cAAqB;CACnC,OAAO,8BAA8B,uBAAuB;AAC9D;;AAwBA,SAAgB,UAAiB;CAC/B,OAAO,8BAA8B,mBAAmB;AAC1D;;AAyBA,SAAgB,gBAAuB;CACrC,OAAO,8BAA8B,yBAAyB;AAChE;;AA4BA,SAAgB,SAAgB;CAC9B,OAAO,8BAA8B,kBAAkB;AACzD;;AAiCA,SAAgB,eAAsB;CACpC,OAAO,8BAA8B,wBAAwB;AAC/D;;AAwBA,SAAgB,WAAkB;CAChC,OAAO,8BAA8B,oBAAoB;AAC3D;;AAyBA,SAAgB,iBAAwB;CACtC,OAAO,8BAA8B,0BAA0B;AACjE;;AA4BA,SAAgB,QAAe;CAC7B,OAAO,8BAA8B,iBAAiB;AACxD;;AAiCA,SAAgB,cAAqB;CACnC,OAAO,8BAA8B,uBAAuB;AAC9D;;AAwBA,SAAgB,UAAiB;CAC/B,OAAO,8BAA8B,mBAAmB;AAC1D;;AAyBA,SAAgB,gBAAuB;CACrC,OAAO,8BAA8B,yBAAyB;AAChE;;AA4BA,SAAgB,QAAe;CAC7B,OAAO,8BAA8B,iBAAiB;AACxD;;AAiCA,SAAgB,cAAqB;CACnC,OAAO,8BAA8B,uBAAuB;AAC9D;;AAwBA,SAAgB,UAAiB;CAC/B,OAAO,8BAA8B,mBAAmB;AAC1D;;AAyBA,SAAgB,gBAAuB;CACrC,OAAO,8BAA8B,yBAAyB;AAChE;;AAqBA,SAAgB,cAAqB;CACnC,8BAA8B,uBAAuB;AACvD;;AAwBA,SAAgB,oBAA2B;CACzC,8BAA8B,6BAA6B;AAC7D;;AAkBA,SAAgB,gBAAuB;CACrC,8BAA8B,yBAAyB;AACzD;;AAoBA,SAAgB,sBAA6B;CAC3C,8BAA8B,+BAA+B;AAC/D;;AAkBA,SAAgB,eAAsB;CACpC,8BAA8B,wBAAwB;AACxD;;AAwBA,SAAgB,qBAA4B;CAC1C,8BAA8B,8BAA8B;AAC9D;;AAkBA,SAAgB,iBAAwB;CACtC,8BAA8B,0BAA0B;AAC1D;;AAoBA,SAAgB,uBAA8B;CAC5C,8BAA8B,gCAAgC;AAChE;;AAkBA,SAAgB,cAAqB;CACnC,8BAA8B,uBAAuB;AACvD;;AAwBA,SAAgB,oBAA2B;CACzC,8BAA8B,6BAA6B;AAC7D;;AAkBA,SAAgB,gBAAuB;CACrC,8BAA8B,yBAAyB;AACzD;;AAoBA,SAAgB,sBAA6B;CAC3C,8BAA8B,+BAA+B;AAC/D;;AAkBA,SAAgB,cAAqB;CACnC,8BAA8B,uBAAuB;AACvD;;AAwBA,SAAgB,oBAA2B;CACzC,8BAA8B,6BAA6B;AAC7D;;AAkBA,SAAgB,gBAAuB;CACrC,8BAA8B,yBAAyB;AACzD;;AAoBA,SAAgB,sBAA6B;CAC3C,8BAA8B,+BAA+B;AAC/D"}
|
|
1
|
+
{"version":3,"file":"notations.mjs","names":[],"sources":["../src/notations.ts"],"sourcesContent":["import {\n CamelCase,\n IValidation,\n KebabCase,\n PascalCase,\n SnakeCase,\n} from \"@typia/interface\";\n\nimport { TypeGuardError } from \"./TypeGuardError\";\nimport { NoTransformConfigurationError } from \"./transformers/NoTransformConfigurationError\";\n\n/* ===========================================================\n NOTATIONS (NAMING CONVENTIONS)\n - CAMEL CASE\n - PASCAL CASE\n - SNAKE CASE\n - KEBAB CASE\n - FACTORY FUNCTIONS\n==============================================================\n CAMEL CASE\n----------------------------------------------------------- */\n/**\n * Converts property names to camelCase.\n *\n * Transforms all property names in the object (including nested) to camelCase\n * convention. Creates a new object with renamed properties. Distinct source\n * keys that become the same destination key are rejected with an error instead\n * of silently discarding a value. This collision policy also applies to the\n * assert, is, validate, and factory variants.\n *\n * Does not validate the input. For validation, use:\n *\n * - {@link assertCamel} — Throws on type mismatch\n * - {@link isCamel} — Returns `null` on type mismatch\n * - {@link validateCamel} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns New object with camelCase property names\n * @throws {Error} When two source keys become the same destination key\n */\nexport function camel<T>(input: T): CamelCase<T>;\n\n/** @internal */\nexport function camel(): never {\n return NoTransformConfigurationError(\"notations.camel\");\n}\n\n/**\n * Converts property names to camelCase with assertion.\n *\n * Transforms all property names to camelCase with {@link assert} validation.\n * Throws {@link TypeGuardError} on type mismatch.\n *\n * Related functions:\n *\n * - {@link camel} — No validation\n * - {@link isCamel} — Returns `null` instead of throwing\n * - {@link validateCamel} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns New object with camelCase property names\n * @throws {TypeGuardError} When input doesn't conform to type `T`\n */\nexport function assertCamel<T>(\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): CamelCase<T>;\n\n/** @internal */\nexport function assertCamel<T>(\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): CamelCase<T>;\n\n/** @internal */\nexport function assertCamel(): never {\n return NoTransformConfigurationError(\"notations.assertCamel\");\n}\n\n/**\n * Converts property names to camelCase with type checking.\n *\n * Transforms all property names to camelCase with {@link is} validation. Returns\n * `null` on type mismatch.\n *\n * Related functions:\n *\n * - {@link camel} — No validation\n * - {@link assertCamel} — Throws instead of returning `null`\n * - {@link validateCamel} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns New object with camelCase property names, or `null` if invalid\n */\nexport function isCamel<T>(input: T): CamelCase<T> | null;\n\n/** @internal */\nexport function isCamel<T>(input: unknown): CamelCase<T> | null;\n\n/** @internal */\nexport function isCamel(): never {\n return NoTransformConfigurationError(\"notations.isCamel\");\n}\n\n/**\n * Converts property names to camelCase with validation.\n *\n * Transforms all property names to camelCase with {@link validate} validation.\n * Returns {@link IValidation.IFailure} with all errors on mismatch, or\n * {@link IValidation.ISuccess} with converted object.\n *\n * Related functions:\n *\n * - {@link camel} — No validation\n * - {@link assertCamel} — Throws on first error\n * - {@link isCamel} — Returns `null` instead of error details\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns Validation result containing converted object or errors\n */\nexport function validateCamel<T>(input: T): IValidation<CamelCase<T>>;\n\n/** @internal */\nexport function validateCamel<T>(input: unknown): IValidation<CamelCase<T>>;\n\n/** @internal */\nexport function validateCamel(): never {\n return NoTransformConfigurationError(\"notations.validateCamel\");\n}\n\n/* -----------------------------------------------------------\n PASCAL CASE\n----------------------------------------------------------- */\n/**\n * Converts property names to PascalCase.\n *\n * Transforms all property names in the object (including nested) to PascalCase\n * convention. Creates a new object with renamed properties. Distinct source\n * keys that become the same destination key are rejected with an error instead\n * of silently discarding a value. This collision policy also applies to the\n * assert, is, validate, and factory variants.\n *\n * Does not validate the input. For validation, use:\n *\n * - {@link assertPascal} — Throws on type mismatch\n * - {@link isPascal} — Returns `null` on type mismatch\n * - {@link validatePascal} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns New object with PascalCase property names\n * @throws {Error} When two source keys become the same destination key\n */\nexport function pascal<T>(input: T): PascalCase<T>;\n\n/** @internal */\nexport function pascal(): never {\n return NoTransformConfigurationError(\"notations.pascal\");\n}\n\n/**\n * Converts property names to PascalCase with assertion.\n *\n * Transforms all property names to PascalCase with {@link assert} validation.\n * Throws {@link TypeGuardError} on type mismatch.\n *\n * Related functions:\n *\n * - {@link pascal} — No validation\n * - {@link isPascal} — Returns `null` instead of throwing\n * - {@link validatePascal} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns New object with PascalCase property names\n * @throws {TypeGuardError} When input doesn't conform to type `T`\n */\nexport function assertPascal<T>(\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): PascalCase<T>;\n\n/** @internal */\nexport function assertPascal<T>(\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): PascalCase<T>;\n\n/** @internal */\nexport function assertPascal(): never {\n return NoTransformConfigurationError(\"notations.assertPascal\");\n}\n\n/**\n * Converts property names to PascalCase with type checking.\n *\n * Transforms all property names to PascalCase with {@link is} validation.\n * Returns `null` on type mismatch.\n *\n * Related functions:\n *\n * - {@link pascal} — No validation\n * - {@link assertPascal} — Throws instead of returning `null`\n * - {@link validatePascal} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns New object with PascalCase property names, or `null` if invalid\n */\nexport function isPascal<T>(input: T): PascalCase<T> | null;\n\n/** @internal */\nexport function isPascal<T>(input: unknown): PascalCase<T> | null;\n\n/** @internal */\nexport function isPascal(): never {\n return NoTransformConfigurationError(\"notations.isPascal\");\n}\n\n/**\n * Converts property names to PascalCase with validation.\n *\n * Transforms all property names to PascalCase with {@link validate} validation.\n * Returns {@link IValidation.IFailure} with all errors on mismatch, or\n * {@link IValidation.ISuccess} with converted object.\n *\n * Related functions:\n *\n * - {@link pascal} — No validation\n * - {@link assertPascal} — Throws on first error\n * - {@link isPascal} — Returns `null` instead of error details\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns Validation result containing converted object or errors\n */\nexport function validatePascal<T>(input: T): IValidation<PascalCase<T>>;\n\n/** @internal */\nexport function validatePascal<T>(input: unknown): IValidation<PascalCase<T>>;\n\n/** @internal */\nexport function validatePascal(): never {\n return NoTransformConfigurationError(\"notations.validatePascal\");\n}\n\n/* -----------------------------------------------------------\n SNAKE CASE\n----------------------------------------------------------- */\n/**\n * Converts property names to snake_case.\n *\n * Transforms all property names in the object (including nested) to snake_case\n * convention. Creates a new object with renamed properties. Distinct source\n * keys that become the same destination key are rejected with an error instead\n * of silently discarding a value. This collision policy also applies to the\n * assert, is, validate, and factory variants.\n *\n * Does not validate the input. For validation, use:\n *\n * - {@link assertSnake} — Throws on type mismatch\n * - {@link isSnake} — Returns `null` on type mismatch\n * - {@link validateSnake} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns New object with snake_case property names\n * @throws {Error} When two source keys become the same destination key\n */\nexport function snake<T>(input: T): SnakeCase<T>;\n\n/** @internal */\nexport function snake(): never {\n return NoTransformConfigurationError(\"notations.snake\");\n}\n\n/**\n * Converts property names to snake_case with assertion.\n *\n * Transforms all property names to snake_case with {@link assert} validation.\n * Throws {@link TypeGuardError} on type mismatch.\n *\n * Related functions:\n *\n * - {@link snake} — No validation\n * - {@link isSnake} — Returns `null` instead of throwing\n * - {@link validateSnake} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns New object with snake_case property names\n * @throws {TypeGuardError} When input doesn't conform to type `T`\n */\nexport function assertSnake<T>(\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): SnakeCase<T>;\n\n/** @internal */\nexport function assertSnake<T>(\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): SnakeCase<T>;\n\n/** @internal */\nexport function assertSnake(): never {\n return NoTransformConfigurationError(\"notations.assertSnake\");\n}\n\n/**\n * Converts property names to snake_case with type checking.\n *\n * Transforms all property names to snake_case with {@link is} validation.\n * Returns `null` on type mismatch.\n *\n * Related functions:\n *\n * - {@link snake} — No validation\n * - {@link assertSnake} — Throws instead of returning `null`\n * - {@link validateSnake} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns New object with snake_case property names, or `null` if invalid\n */\nexport function isSnake<T>(input: T): SnakeCase<T> | null;\n\n/** @internal */\nexport function isSnake<T>(input: unknown): SnakeCase<T> | null;\n\n/** @internal */\nexport function isSnake(): never {\n return NoTransformConfigurationError(\"notations.isSnake\");\n}\n\n/**\n * Converts property names to snake_case with validation.\n *\n * Transforms all property names to snake_case with {@link validate} validation.\n * Returns {@link IValidation.IFailure} with all errors on mismatch, or\n * {@link IValidation.ISuccess} with converted object.\n *\n * Related functions:\n *\n * - {@link snake} — No validation\n * - {@link assertSnake} — Throws on first error\n * - {@link isSnake} — Returns `null` instead of error details\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns Validation result containing converted object or errors\n */\nexport function validateSnake<T>(input: T): IValidation<SnakeCase<T>>;\n\n/** @internal */\nexport function validateSnake<T>(input: unknown): IValidation<SnakeCase<T>>;\n\n/** @internal */\nexport function validateSnake(): never {\n return NoTransformConfigurationError(\"notations.validateSnake\");\n}\n\n/* -----------------------------------------------------------\n KEBAB CASE\n----------------------------------------------------------- */\n/**\n * Converts property names to kebab-case.\n *\n * Transforms all property names in the object (including nested) to kebab-case\n * convention. Creates a new object with renamed properties. Distinct source\n * keys that become the same destination key are rejected with an error instead\n * of silently discarding a value. This collision policy also applies to the\n * assert, is, validate, and factory variants.\n *\n * Does not validate the input. For validation, use:\n *\n * - {@link assertKebab} — Throws on type mismatch\n * - {@link isKebab} — Returns `null` on type mismatch\n * - {@link validateKebab} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns New object with kebab-case property names\n * @throws {Error} When two source keys become the same destination key\n */\nexport function kebab<T>(input: T): KebabCase<T>;\n\n/** @internal */\nexport function kebab(): never {\n return NoTransformConfigurationError(\"notations.kebab\");\n}\n\n/**\n * Converts property names to kebab-case with assertion.\n *\n * Transforms all property names to kebab-case with {@link assert} validation.\n * Throws {@link TypeGuardError} on type mismatch.\n *\n * Related functions:\n *\n * - {@link kebab} — No validation\n * - {@link isKebab} — Returns `null` instead of throwing\n * - {@link validateKebab} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns New object with kebab-case property names\n * @throws {TypeGuardError} When input doesn't conform to type `T`\n */\nexport function assertKebab<T>(\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): KebabCase<T>;\n\n/** @internal */\nexport function assertKebab<T>(\n input: unknown,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): KebabCase<T>;\n\n/** @internal */\nexport function assertKebab(): never {\n return NoTransformConfigurationError(\"notations.assertKebab\");\n}\n\n/**\n * Converts property names to kebab-case with type checking.\n *\n * Transforms all property names to kebab-case with {@link is} validation.\n * Returns `null` on type mismatch.\n *\n * Related functions:\n *\n * - {@link kebab} — No validation\n * - {@link assertKebab} — Throws instead of returning `null`\n * - {@link validateKebab} — Returns detailed validation errors\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns New object with kebab-case property names, or `null` if invalid\n */\nexport function isKebab<T>(input: T): KebabCase<T> | null;\n\n/** @internal */\nexport function isKebab<T>(input: unknown): KebabCase<T> | null;\n\n/** @internal */\nexport function isKebab(): never {\n return NoTransformConfigurationError(\"notations.isKebab\");\n}\n\n/**\n * Converts property names to kebab-case with validation.\n *\n * Transforms all property names to kebab-case with {@link validate} validation.\n * Returns {@link IValidation.IFailure} with all errors on mismatch, or\n * {@link IValidation.ISuccess} with converted object.\n *\n * Related functions:\n *\n * - {@link kebab} — No validation\n * - {@link assertKebab} — Throws on first error\n * - {@link isKebab} — Returns `null` instead of error details\n *\n * @template T Type of input value\n * @param input Object to convert\n * @returns Validation result containing converted object or errors\n */\nexport function validateKebab<T>(input: T): IValidation<KebabCase<T>>;\n\n/** @internal */\nexport function validateKebab<T>(input: unknown): IValidation<KebabCase<T>>;\n\n/** @internal */\nexport function validateKebab(): never {\n return NoTransformConfigurationError(\"notations.validateKebab\");\n}\n\n/* -----------------------------------------------------------\n FACTORY FUNCTIONS\n----------------------------------------------------------- */\n/**\n * Creates reusable {@link camel} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createCamel(): never;\n\n/**\n * Creates reusable {@link camel} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createCamel<T>(): (input: T) => CamelCase<T>;\n\n/** @internal */\nexport function createCamel(): never {\n NoTransformConfigurationError(\"notations.createCamel\");\n}\n\n/**\n * Creates reusable {@link assertCamel} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertCamel(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertCamel} function.\n *\n * @template T Type of input value\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable conversion function\n */\nexport function createAssertCamel<T>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n) => CamelCase<T>;\n\n/** @internal */\nexport function createAssertCamel(): never {\n NoTransformConfigurationError(\"notations.createAssertCamel\");\n}\n\n/**\n * Creates reusable {@link isCamel} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createIsCamel(): never;\n\n/**\n * Creates reusable {@link isCamel} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createIsCamel<T>(): (input: T) => CamelCase<T> | null;\n\n/** @internal */\nexport function createIsCamel(): never {\n NoTransformConfigurationError(\"notations.createIsCamel\");\n}\n\n/**\n * Creates reusable {@link validateCamel} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createValidateCamel(): never;\n\n/**\n * Creates reusable {@link validateCamel} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createValidateCamel<T>(): (\n input: T,\n) => IValidation<CamelCase<T>>;\n\n/** @internal */\nexport function createValidateCamel(): never {\n NoTransformConfigurationError(\"notations.createValidateCamel\");\n}\n\n/**\n * Creates reusable {@link pascal} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createPascal(): never;\n\n/**\n * Creates reusable {@link pascal} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createPascal<T>(): (input: T) => PascalCase<T>;\n\n/** @internal */\nexport function createPascal(): never {\n NoTransformConfigurationError(\"notations.createPascal\");\n}\n\n/**\n * Creates reusable {@link assertPascal} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertPascal(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertPascal} function.\n *\n * @template T Type of input value\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable conversion function\n */\nexport function createAssertPascal<T>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n) => PascalCase<T>;\n\n/** @internal */\nexport function createAssertPascal(): never {\n NoTransformConfigurationError(\"notations.createAssertPascal\");\n}\n\n/**\n * Creates reusable {@link isPascal} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createIsPascal(): never;\n\n/**\n * Creates reusable {@link isPascal} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createIsPascal<T>(): (input: T) => PascalCase<T> | null;\n\n/** @internal */\nexport function createIsPascal(): never {\n NoTransformConfigurationError(\"notations.createIsPascal\");\n}\n\n/**\n * Creates reusable {@link validatePascal} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createValidatePascal(): never;\n\n/**\n * Creates reusable {@link validatePascal} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createValidatePascal<T>(): (\n input: T,\n) => IValidation<PascalCase<T>>;\n\n/** @internal */\nexport function createValidatePascal(): never {\n NoTransformConfigurationError(\"notations.createValidatePascal\");\n}\n\n/**\n * Creates reusable {@link snake} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createSnake(): never;\n\n/**\n * Creates reusable {@link snake} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createSnake<T>(): (input: T) => SnakeCase<T>;\n\n/** @internal */\nexport function createSnake(): never {\n NoTransformConfigurationError(\"notations.createSnake\");\n}\n\n/**\n * Creates reusable {@link assertSnake} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertSnake(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertSnake} function.\n *\n * @template T Type of input value\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable conversion function\n */\nexport function createAssertSnake<T>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n) => SnakeCase<T>;\n\n/** @internal */\nexport function createAssertSnake(): never {\n NoTransformConfigurationError(\"notations.createAssertSnake\");\n}\n\n/**\n * Creates reusable {@link isSnake} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createIsSnake(): never;\n\n/**\n * Creates reusable {@link isSnake} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createIsSnake<T>(): (input: T) => SnakeCase<T> | null;\n\n/** @internal */\nexport function createIsSnake(): never {\n NoTransformConfigurationError(\"notations.createIsSnake\");\n}\n\n/**\n * Creates reusable {@link validateSnake} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createValidateSnake(): never;\n\n/**\n * Creates reusable {@link validateSnake} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createValidateSnake<T>(): (\n input: T,\n) => IValidation<SnakeCase<T>>;\n\n/** @internal */\nexport function createValidateSnake(): never {\n NoTransformConfigurationError(\"notations.createValidateSnake\");\n}\n\n/**\n * Creates reusable {@link kebab} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createKebab(): never;\n\n/**\n * Creates reusable {@link kebab} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createKebab<T>(): (input: T) => KebabCase<T>;\n\n/** @internal */\nexport function createKebab(): never {\n NoTransformConfigurationError(\"notations.createKebab\");\n}\n\n/**\n * Creates reusable {@link assertKebab} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertKebab(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertKebab} function.\n *\n * @template T Type of input value\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable conversion function\n */\nexport function createAssertKebab<T>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (\n input: T,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n) => KebabCase<T>;\n\n/** @internal */\nexport function createAssertKebab(): never {\n NoTransformConfigurationError(\"notations.createAssertKebab\");\n}\n\n/**\n * Creates reusable {@link isKebab} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createIsKebab(): never;\n\n/**\n * Creates reusable {@link isKebab} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createIsKebab<T>(): (input: T) => KebabCase<T> | null;\n\n/** @internal */\nexport function createIsKebab(): never {\n NoTransformConfigurationError(\"notations.createIsKebab\");\n}\n\n/**\n * Creates reusable {@link validateKebab} function.\n *\n * @danger You must configure the generic argument `T`\n */\nexport function createValidateKebab(): never;\n\n/**\n * Creates reusable {@link validateKebab} function.\n *\n * @template T Type of input value\n * @returns Reusable conversion function\n */\nexport function createValidateKebab<T>(): (\n input: T,\n) => IValidation<KebabCase<T>>;\n\n/** @internal */\nexport function createValidateKebab(): never {\n NoTransformConfigurationError(\"notations.createValidateKebab\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,SAAgB,QAAe;CAC7B,OAAO,8BAA8B,iBAAiB;AACxD;;AAiCA,SAAgB,cAAqB;CACnC,OAAO,8BAA8B,uBAAuB;AAC9D;;AAwBA,SAAgB,UAAiB;CAC/B,OAAO,8BAA8B,mBAAmB;AAC1D;;AAyBA,SAAgB,gBAAuB;CACrC,OAAO,8BAA8B,yBAAyB;AAChE;;AA4BA,SAAgB,SAAgB;CAC9B,OAAO,8BAA8B,kBAAkB;AACzD;;AAiCA,SAAgB,eAAsB;CACpC,OAAO,8BAA8B,wBAAwB;AAC/D;;AAwBA,SAAgB,WAAkB;CAChC,OAAO,8BAA8B,oBAAoB;AAC3D;;AAyBA,SAAgB,iBAAwB;CACtC,OAAO,8BAA8B,0BAA0B;AACjE;;AA4BA,SAAgB,QAAe;CAC7B,OAAO,8BAA8B,iBAAiB;AACxD;;AAiCA,SAAgB,cAAqB;CACnC,OAAO,8BAA8B,uBAAuB;AAC9D;;AAwBA,SAAgB,UAAiB;CAC/B,OAAO,8BAA8B,mBAAmB;AAC1D;;AAyBA,SAAgB,gBAAuB;CACrC,OAAO,8BAA8B,yBAAyB;AAChE;;AA4BA,SAAgB,QAAe;CAC7B,OAAO,8BAA8B,iBAAiB;AACxD;;AAiCA,SAAgB,cAAqB;CACnC,OAAO,8BAA8B,uBAAuB;AAC9D;;AAwBA,SAAgB,UAAiB;CAC/B,OAAO,8BAA8B,mBAAmB;AAC1D;;AAyBA,SAAgB,gBAAuB;CACrC,OAAO,8BAA8B,yBAAyB;AAChE;;AAqBA,SAAgB,cAAqB;CACnC,8BAA8B,uBAAuB;AACvD;;AA2BA,SAAgB,oBAA2B;CACzC,8BAA8B,6BAA6B;AAC7D;;AAkBA,SAAgB,gBAAuB;CACrC,8BAA8B,yBAAyB;AACzD;;AAoBA,SAAgB,sBAA6B;CAC3C,8BAA8B,+BAA+B;AAC/D;;AAkBA,SAAgB,eAAsB;CACpC,8BAA8B,wBAAwB;AACxD;;AA2BA,SAAgB,qBAA4B;CAC1C,8BAA8B,8BAA8B;AAC9D;;AAkBA,SAAgB,iBAAwB;CACtC,8BAA8B,0BAA0B;AAC1D;;AAoBA,SAAgB,uBAA8B;CAC5C,8BAA8B,gCAAgC;AAChE;;AAkBA,SAAgB,cAAqB;CACnC,8BAA8B,uBAAuB;AACvD;;AA2BA,SAAgB,oBAA2B;CACzC,8BAA8B,6BAA6B;AAC7D;;AAkBA,SAAgB,gBAAuB;CACrC,8BAA8B,yBAAyB;AACzD;;AAoBA,SAAgB,sBAA6B;CAC3C,8BAA8B,+BAA+B;AAC/D;;AAkBA,SAAgB,cAAqB;CACnC,8BAA8B,uBAAuB;AACvD;;AA2BA,SAAgB,oBAA2B;CACzC,8BAA8B,6BAA6B;AAC7D;;AAkBA,SAAgB,gBAAuB;CACrC,8BAA8B,yBAAyB;AACzD;;AAoBA,SAAgB,sBAA6B;CAC3C,8BAA8B,+BAA+B;AAC/D"}
|
package/lib/plain.d.ts
CHANGED
|
@@ -232,7 +232,7 @@ export declare function createAssertClone(errorFactory?: undefined | ((props: Ty
|
|
|
232
232
|
* {@link TypeGuardError.IProps}
|
|
233
233
|
* @returns Reusable clone function
|
|
234
234
|
*/
|
|
235
|
-
export declare function createAssertClone<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown) => Resolved<T>;
|
|
235
|
+
export declare function createAssertClone<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)) => Resolved<T>;
|
|
236
236
|
/**
|
|
237
237
|
* Creates reusable {@link isClone} function.
|
|
238
238
|
*
|
|
@@ -286,7 +286,7 @@ export declare function createAssertPrune(errorFactory?: undefined | ((props: Ty
|
|
|
286
286
|
* {@link TypeGuardError.IProps}
|
|
287
287
|
* @returns Reusable prune function
|
|
288
288
|
*/
|
|
289
|
-
export declare function createAssertPrune<T extends object>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown) => T;
|
|
289
|
+
export declare function createAssertPrune<T extends object>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)) => T;
|
|
290
290
|
/**
|
|
291
291
|
* Creates reusable {@link isPrune} function.
|
|
292
292
|
*
|
|
@@ -340,7 +340,7 @@ export declare function createAssertClassify(errorFactory?: undefined | ((props:
|
|
|
340
340
|
* {@link TypeGuardError.IProps}
|
|
341
341
|
* @returns Reusable classify function
|
|
342
342
|
*/
|
|
343
|
-
export declare function createAssertClassify<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown) => ClassifyResult<T>;
|
|
343
|
+
export declare function createAssertClassify<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)) => ClassifyResult<T>;
|
|
344
344
|
/**
|
|
345
345
|
* Creates reusable {@link validateClassify} function.
|
|
346
346
|
*
|
package/lib/plain.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plain.js","sourceRoot":"","sources":["../src/plain.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAeA,gGAA6F;AAuB7F,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,aAAa,CAAC,CAAC;AAC/C,CAAC;AAiCD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AACrD,CAAC;AAuBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,eAAe,CAAC,CAAC;AACjD,CAAC;AAyBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,qBAAqB,CAAC,CAAC;AACvD,CAAC;AAsBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,aAAa,CAAC,CAAC;AAC/C,CAAC;AAiCD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AACrD,CAAC;AAwBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,eAAe,CAAC,CAAC;AACjD,CAAC;AAyBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,qBAAqB,CAAC,CAAC;AACvD,CAAC;AA0BD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,gBAAgB,CAAC,CAAC;AAClD,CAAC;AAgCD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,sBAAsB,CAAC,CAAC;AACxD,CAAC;AA2BD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,wBAAwB,CAAC,CAAC;AAC1D,CAAC;AAoBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AACrD,CAAC;
|
|
1
|
+
{"version":3,"file":"plain.js","sourceRoot":"","sources":["../src/plain.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAeA,gGAA6F;AAuB7F,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,aAAa,CAAC,CAAC;AAC/C,CAAC;AAiCD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AACrD,CAAC;AAuBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,eAAe,CAAC,CAAC;AACjD,CAAC;AAyBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,qBAAqB,CAAC,CAAC;AACvD,CAAC;AAsBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,aAAa,CAAC,CAAC;AAC/C,CAAC;AAiCD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AACrD,CAAC;AAwBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,eAAe,CAAC,CAAC;AACjD,CAAC;AAyBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,qBAAqB,CAAC,CAAC;AACvD,CAAC;AA0BD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,gBAAgB,CAAC,CAAC;AAClD,CAAC;AAgCD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,sBAAsB,CAAC,CAAC;AACxD,CAAC;AA2BD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,wBAAwB,CAAC,CAAC;AAC1D,CAAC;AAoBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AACrD,CAAC;AA0BD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,yBAAyB,CAAC,CAAC;AAC3D,CAAC;AAiBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,qBAAqB,CAAC,CAAC;AACvD,CAAC;AAmBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,2BAA2B,CAAC,CAAC;AAC7D,CAAC;AAiBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,mBAAmB,CAAC,CAAC;AACrD,CAAC;AA0BD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,yBAAyB,CAAC,CAAC;AAC3D,CAAC;AAmBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,qBAAqB,CAAC,CAAC;AACvD,CAAC;AAmBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,2BAA2B,CAAC,CAAC;AAC7D,CAAC;AAmBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,sBAAsB,CAAC,CAAC;AACxD,CAAC;AA0BD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,4BAA4B,CAAC,CAAC;AAC9D,CAAC;AAmBD,gBAAgB;AAChB;IACE,IAAA,6DAA6B,EAAC,8BAA8B,CAAC,CAAC;AAChE,CAAC"}
|