typia 3.5.0-dev.20230213 → 3.5.0-dev.20230214
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -1
- package/lib/IRandomGenerator.d.ts +15 -0
- package/lib/IRandomGenerator.js +3 -0
- package/lib/IRandomGenerator.js.map +1 -0
- package/lib/factories/ExpressionFactory.d.ts +1 -0
- package/lib/factories/ExpressionFactory.js +4 -0
- package/lib/factories/ExpressionFactory.js.map +1 -1
- package/lib/factories/MetadataFactory.js +15 -5
- package/lib/factories/MetadataFactory.js.map +1 -1
- package/lib/factories/MetadataTagFactory.js +11 -101
- package/lib/factories/MetadataTagFactory.js.map +1 -1
- package/lib/functional/$any.d.ts +1 -0
- package/lib/functional/$any.js +8 -0
- package/lib/functional/$any.js.map +1 -0
- package/lib/{programmers/internal/check_length.d.ts → functional/Namespace.d.ts} +0 -0
- package/lib/functional/Namespace.js +80 -0
- package/lib/functional/Namespace.js.map +1 -0
- package/lib/metadata/IMetadataTag.d.ts +3 -10
- package/lib/module.d.ts +254 -18
- package/lib/module.js +68 -246
- package/lib/module.js.map +1 -1
- package/lib/programmers/AssertCloneProgrammer.d.ts +5 -0
- package/lib/programmers/AssertCloneProgrammer.js +37 -0
- package/lib/programmers/AssertCloneProgrammer.js.map +1 -0
- package/lib/programmers/CloneProgrammer.js +2 -4
- package/lib/programmers/CloneProgrammer.js.map +1 -1
- package/lib/programmers/IsCloneProgrammer.d.ts +5 -0
- package/lib/programmers/IsCloneProgrammer.js +37 -0
- package/lib/programmers/IsCloneProgrammer.js.map +1 -0
- package/lib/programmers/IsProgrammer.d.ts +1 -1
- package/lib/programmers/IsProgrammer.js +5 -2
- package/lib/programmers/IsProgrammer.js.map +1 -1
- package/lib/programmers/RandomProgrammer.d.ts +5 -0
- package/lib/programmers/RandomProgrammer.js +338 -0
- package/lib/programmers/RandomProgrammer.js.map +1 -0
- package/lib/programmers/StringifyProgrammer.js +1 -1
- package/lib/programmers/StringifyProgrammer.js.map +1 -1
- package/lib/programmers/ValidateCloneProgrammer.d.ts +5 -0
- package/lib/programmers/ValidateCloneProgrammer.js +37 -0
- package/lib/programmers/ValidateCloneProgrammer.js.map +1 -0
- package/lib/programmers/ValidateStringifyProgrammer.js +1 -1
- package/lib/programmers/ValidateStringifyProgrammer.js.map +1 -1
- package/lib/programmers/helpers/CloneJoiner.js +2 -2
- package/lib/programmers/helpers/CloneJoiner.js.map +1 -1
- package/lib/programmers/helpers/RandomJoiner.d.ts +10 -0
- package/lib/programmers/helpers/RandomJoiner.js +93 -0
- package/lib/programmers/helpers/RandomJoiner.js.map +1 -0
- package/lib/programmers/helpers/RandomRanger.d.ts +25 -0
- package/lib/programmers/helpers/RandomRanger.js +138 -0
- package/lib/programmers/helpers/RandomRanger.js.map +1 -0
- package/lib/programmers/helpers/StringifyJoinder.js +2 -2
- package/lib/programmers/helpers/StringifyJoinder.js.map +1 -1
- package/lib/programmers/internal/application_array.js +0 -10
- package/lib/programmers/internal/application_array.js.map +1 -1
- package/lib/programmers/internal/application_number.js +4 -12
- package/lib/programmers/internal/application_number.js.map +1 -1
- package/lib/programmers/internal/application_string.js +0 -8
- package/lib/programmers/internal/application_string.js.map +1 -1
- package/lib/programmers/internal/check_array_length.js +3 -4
- package/lib/programmers/internal/check_array_length.js.map +1 -1
- package/lib/programmers/internal/check_bigint.js +0 -12
- package/lib/programmers/internal/check_bigint.js.map +1 -1
- package/lib/programmers/internal/check_number.js +7 -25
- package/lib/programmers/internal/check_number.js.map +1 -1
- package/lib/programmers/internal/check_string_tags.js +2 -3
- package/lib/programmers/internal/check_string_tags.js.map +1 -1
- package/lib/schemas/IJsonSchema.d.ts +36 -2
- package/lib/transformers/CallExpressionTransformer.js +16 -0
- package/lib/transformers/CallExpressionTransformer.js.map +1 -1
- package/lib/transformers/features/miscellaneous/AssertCloneTransformer.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/AssertCloneTransformer.js +23 -0
- package/lib/transformers/features/miscellaneous/AssertCloneTransformer.js.map +1 -0
- package/lib/transformers/features/miscellaneous/CreateAssertCloneTransformer.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/CreateAssertCloneTransformer.js +18 -0
- package/lib/transformers/features/miscellaneous/CreateAssertCloneTransformer.js.map +1 -0
- package/lib/transformers/features/miscellaneous/CreateAssertPruneTransformer.js +2 -1
- package/lib/transformers/features/miscellaneous/CreateAssertPruneTransformer.js.map +1 -1
- package/lib/transformers/features/miscellaneous/CreateCloneTransformer.js +2 -1
- package/lib/transformers/features/miscellaneous/CreateCloneTransformer.js.map +1 -1
- package/lib/transformers/features/miscellaneous/CreateIsCloneTransformer.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/CreateIsCloneTransformer.js +18 -0
- package/lib/transformers/features/miscellaneous/CreateIsCloneTransformer.js.map +1 -0
- package/lib/transformers/features/miscellaneous/CreateIsPruneTransformer.js +2 -1
- package/lib/transformers/features/miscellaneous/CreateIsPruneTransformer.js.map +1 -1
- package/lib/transformers/features/miscellaneous/CreatePruneTransformer.js +2 -1
- package/lib/transformers/features/miscellaneous/CreatePruneTransformer.js.map +1 -1
- package/lib/transformers/features/miscellaneous/CreateRandomGenerator.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/CreateRandomGenerator.js +29 -0
- package/lib/transformers/features/miscellaneous/CreateRandomGenerator.js.map +1 -0
- package/lib/transformers/features/miscellaneous/CreateValidateCloneTransformer.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/CreateValidateCloneTransformer.js +18 -0
- package/lib/transformers/features/miscellaneous/CreateValidateCloneTransformer.js.map +1 -0
- package/lib/transformers/features/miscellaneous/CreateValidatePruneTransformer.js +2 -1
- package/lib/transformers/features/miscellaneous/CreateValidatePruneTransformer.js.map +1 -1
- package/lib/transformers/features/miscellaneous/IsCloneTransformer.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/IsCloneTransformer.js +23 -0
- package/lib/transformers/features/miscellaneous/IsCloneTransformer.js.map +1 -0
- package/lib/transformers/features/miscellaneous/RandomTransformer.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/RandomTransformer.js +35 -0
- package/lib/transformers/features/miscellaneous/RandomTransformer.js.map +1 -0
- package/lib/transformers/features/miscellaneous/ValidateCloneTransformer.d.ts +5 -0
- package/lib/transformers/features/miscellaneous/ValidateCloneTransformer.js +23 -0
- package/lib/transformers/features/miscellaneous/ValidateCloneTransformer.js.map +1 -0
- package/lib/transformers/features/parsers/AssertParseTransformer.js +2 -1
- package/lib/transformers/features/parsers/AssertParseTransformer.js.map +1 -1
- package/lib/transformers/features/parsers/CreateAssertParseTransformer.js +2 -1
- package/lib/transformers/features/parsers/CreateAssertParseTransformer.js.map +1 -1
- package/lib/transformers/features/parsers/CreateIsParseTransformer.js +2 -1
- package/lib/transformers/features/parsers/CreateIsParseTransformer.js.map +1 -1
- package/lib/transformers/features/parsers/CreateValidateParseTransformer.js +2 -1
- package/lib/transformers/features/parsers/CreateValidateParseTransformer.js.map +1 -1
- package/lib/transformers/features/parsers/IsParseTransformer.js +2 -1
- package/lib/transformers/features/parsers/IsParseTransformer.js.map +1 -1
- package/lib/transformers/features/parsers/ValidateParseTransformer.js +2 -1
- package/lib/transformers/features/parsers/ValidateParseTransformer.js.map +1 -1
- package/lib/transformers/features/stringifiers/CreateAssertStringifyTransformer.js +2 -1
- package/lib/transformers/features/stringifiers/CreateAssertStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/stringifiers/CreateIsStringifyTransformer.js +2 -1
- package/lib/transformers/features/stringifiers/CreateIsStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/stringifiers/CreateStringifyTransformer.js +2 -1
- package/lib/transformers/features/stringifiers/CreateStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/stringifiers/CreateValidateStringifyProgrammer.js +2 -1
- package/lib/transformers/features/stringifiers/CreateValidateStringifyProgrammer.js.map +1 -1
- package/lib/transformers/features/validators/CreateAssertTransformer.js +2 -1
- package/lib/transformers/features/validators/CreateAssertTransformer.js.map +1 -1
- package/lib/transformers/features/validators/CreateIsTransformer.js +2 -1
- package/lib/transformers/features/validators/CreateIsTransformer.js.map +1 -1
- package/lib/transformers/features/validators/CreateValidateTransformer.js +2 -1
- package/lib/transformers/features/validators/CreateValidateTransformer.js.map +1 -1
- package/lib/utils/RandomGenerator.d.ts +1 -0
- package/lib/utils/RandomGenerator.js +85 -0
- package/lib/utils/RandomGenerator.js.map +1 -0
- package/package.json +8 -3
- package/src/IRandomGenerator.ts +16 -0
- package/src/factories/ExpressionFactory.ts +11 -0
- package/src/factories/MetadataFactory.ts +18 -14
- package/src/factories/MetadataTagFactory.ts +11 -97
- package/src/functional/$any.ts +3 -0
- package/src/functional/Namespace.ts +121 -0
- package/src/metadata/IMetadataTag.ts +2 -11
- package/src/module.ts +375 -368
- package/src/programmers/AssertCloneProgrammer.ts +60 -0
- package/src/programmers/CloneProgrammer.ts +3 -9
- package/src/programmers/IsCloneProgrammer.ts +66 -0
- package/src/programmers/IsProgrammer.ts +8 -5
- package/src/programmers/RandomProgrammer.ts +367 -0
- package/src/programmers/StringifyProgrammer.ts +2 -4
- package/src/programmers/ValidateCloneProgrammer.ts +77 -0
- package/src/programmers/ValidateStringifyProgrammer.ts +1 -4
- package/src/programmers/helpers/CloneJoiner.ts +2 -4
- package/src/programmers/helpers/RandomJoiner.ts +140 -0
- package/src/programmers/helpers/RandomRanger.ts +215 -0
- package/src/programmers/helpers/StringifyJoinder.ts +4 -4
- package/src/programmers/internal/application_array.ts +0 -10
- package/src/programmers/internal/application_number.ts +7 -13
- package/src/programmers/internal/application_string.ts +0 -8
- package/src/programmers/internal/check_array_length.ts +8 -9
- package/src/programmers/internal/check_bigint.ts +0 -21
- package/src/programmers/internal/check_number.ts +0 -30
- package/src/programmers/internal/check_string_tags.ts +7 -7
- package/src/schemas/IJsonSchema.ts +36 -1
- package/src/transformers/CallExpressionTransformer.ts +19 -0
- package/src/transformers/features/miscellaneous/AssertCloneTransformer.ts +38 -0
- package/src/transformers/features/miscellaneous/CreateAssertCloneTransformer.ts +32 -0
- package/src/transformers/features/miscellaneous/CreateAssertPruneTransformer.ts +1 -1
- package/src/transformers/features/miscellaneous/CreateCloneTransformer.ts +1 -1
- package/src/transformers/features/miscellaneous/CreateIsCloneTransformer.ts +32 -0
- package/src/transformers/features/miscellaneous/CreateIsPruneTransformer.ts +1 -1
- package/src/transformers/features/miscellaneous/CreatePruneTransformer.ts +1 -1
- package/src/transformers/features/miscellaneous/CreateRandomGenerator.ts +39 -0
- package/src/transformers/features/miscellaneous/CreateValidateCloneTransformer.ts +32 -0
- package/src/transformers/features/miscellaneous/CreateValidatePruneTransformer.ts +1 -1
- package/src/transformers/features/miscellaneous/IsCloneTransformer.ts +38 -0
- package/src/transformers/features/miscellaneous/RandomTransformer.ts +45 -0
- package/src/transformers/features/miscellaneous/ValidateCloneTransformer.ts +38 -0
- package/src/transformers/features/parsers/AssertParseTransformer.ts +1 -1
- package/src/transformers/features/parsers/CreateAssertParseTransformer.ts +1 -1
- package/src/transformers/features/parsers/CreateIsParseTransformer.ts +1 -1
- package/src/transformers/features/parsers/CreateValidateParseTransformer.ts +1 -1
- package/src/transformers/features/parsers/IsParseTransformer.ts +1 -1
- package/src/transformers/features/parsers/ValidateParseTransformer.ts +1 -1
- package/src/transformers/features/stringifiers/CreateAssertStringifyTransformer.ts +1 -1
- package/src/transformers/features/stringifiers/CreateIsStringifyTransformer.ts +1 -1
- package/src/transformers/features/stringifiers/CreateStringifyTransformer.ts +1 -1
- package/src/transformers/features/stringifiers/CreateValidateStringifyProgrammer.ts +1 -1
- package/src/transformers/features/validators/CreateAssertTransformer.ts +1 -1
- package/src/transformers/features/validators/CreateIsTransformer.ts +1 -1
- package/src/transformers/features/validators/CreateValidateTransformer.ts +1 -1
- package/src/utils/RandomGenerator.ts +90 -0
- package/lib/programmers/internal/check_length.js +0 -28
- package/lib/programmers/internal/check_length.js.map +0 -1
- package/src/programmers/internal/check_length.ts +0 -46
package/lib/module.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { $is_between } from "./functional/$is_between";
|
|
2
|
-
import { $is_email } from "./functional/$is_email";
|
|
3
|
-
import { $is_ipv4 } from "./functional/$is_ipv4";
|
|
4
|
-
import { $is_ipv6 } from "./functional/$is_ipv6";
|
|
5
|
-
import { $is_url } from "./functional/$is_url";
|
|
6
|
-
import { $is_uuid } from "./functional/$is_uuid";
|
|
7
1
|
import { IJsonApplication } from "./schemas/IJsonApplication";
|
|
8
2
|
import { IValidation } from "./IValidation";
|
|
9
|
-
import {
|
|
3
|
+
import { Primitive } from "./Primitive";
|
|
10
4
|
export * from "./schemas/IJsonApplication";
|
|
11
5
|
export * from "./schemas/IJsonComponents";
|
|
12
6
|
export * from "./schemas/IJsonSchema";
|
|
@@ -646,16 +640,165 @@ export declare function validateStringify<T>(input: T): IValidation<string>;
|
|
|
646
640
|
* @author Jeongho Nam - https://github.com/samchon
|
|
647
641
|
*/
|
|
648
642
|
export declare function validateStringify<T>(input: unknown): IValidation<string>;
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
643
|
+
/**
|
|
644
|
+
* > You must configure the generic argument `T`.
|
|
645
|
+
*
|
|
646
|
+
* Generate random data.
|
|
647
|
+
*
|
|
648
|
+
* Generates a random data following type the `T`.
|
|
649
|
+
*
|
|
650
|
+
* For reference, this `typia.random()` function generates only primitive type.
|
|
651
|
+
* If there're some methods in the type `T` or its nested instances, those would
|
|
652
|
+
* be ignored. Also, when the type `T` has a `toJSON()` method, its return type
|
|
653
|
+
* would be generated instead.
|
|
654
|
+
*
|
|
655
|
+
* @template T Type of data to generate
|
|
656
|
+
* @return Randomly generated data
|
|
657
|
+
*
|
|
658
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
659
|
+
*/
|
|
660
|
+
export declare function random(): never;
|
|
661
|
+
/**
|
|
662
|
+
* Generate random data.
|
|
663
|
+
*
|
|
664
|
+
* Generates a random data following type the `T`.
|
|
665
|
+
*
|
|
666
|
+
* For reference, this `typia.random()` function generates only primitive type.
|
|
667
|
+
* If there're some methods in the type `T` or its nested instances, those would
|
|
668
|
+
* be ignored. Also, when the type `T` has a `toJSON()` method, its return type
|
|
669
|
+
* would be generated instead.
|
|
670
|
+
*
|
|
671
|
+
* @template T Type of data to generate
|
|
672
|
+
* @return Randomly generated data
|
|
673
|
+
*
|
|
674
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
675
|
+
*/
|
|
676
|
+
export declare function random<T>(): Primitive<T>;
|
|
677
|
+
/**
|
|
678
|
+
* Clone a data.
|
|
679
|
+
*
|
|
680
|
+
* Clones an instance following type `T`. If the target *input* value or its member
|
|
681
|
+
* variable contains a class instance that is having a `toJSON()` method, its return
|
|
682
|
+
* value would be cloned.
|
|
683
|
+
*
|
|
684
|
+
* For reference, this `typia.clone()` function does not validate the input value type.
|
|
685
|
+
* It just believes that the input value is following the type `T`. Therefore, if you
|
|
686
|
+
* can't ensure the input value type, it would be better to call {@link assertClone}
|
|
687
|
+
* function instead.
|
|
688
|
+
*
|
|
689
|
+
* @template T Type of the input value
|
|
690
|
+
* @param input A value to be cloned
|
|
691
|
+
* @return Cloned data
|
|
692
|
+
*
|
|
693
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
694
|
+
*/
|
|
695
|
+
export declare function clone<T>(input: T): Primitive<T>;
|
|
696
|
+
/**
|
|
697
|
+
* Clone a data with type assertion.
|
|
698
|
+
*
|
|
699
|
+
* Clones an instance following type `T`, with type assertion. If the target `input`
|
|
700
|
+
* value or its member variable contains a class instance that is having a `toJSON()`
|
|
701
|
+
* method, its return value would be cloned.
|
|
702
|
+
*
|
|
703
|
+
* In such reason, when `input` value is not matched with the type `T`, it throws an
|
|
704
|
+
* {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, cloned
|
|
705
|
+
* data would be returned.
|
|
706
|
+
*
|
|
707
|
+
* @template T Type of the input value
|
|
708
|
+
* @param input A value to be cloned
|
|
709
|
+
* @return Cloned data
|
|
710
|
+
*
|
|
711
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
712
|
+
*/
|
|
713
|
+
export declare function assertClone<T>(input: T): Primitive<T>;
|
|
714
|
+
/**
|
|
715
|
+
* Clone a data with type assertion.
|
|
716
|
+
*
|
|
717
|
+
* Clones an instance following type `T`, with type assertion. If the target `input`
|
|
718
|
+
* value or its member variable contains a class instance that is having a `toJSON()`
|
|
719
|
+
* method, its return value would be cloned.
|
|
720
|
+
*
|
|
721
|
+
* In such reason, when `input` value is not matched with the type `T`, it throws an
|
|
722
|
+
* {@link TypeGuardError}. Otherwise, there's no problem on the `input` value, cloned
|
|
723
|
+
* data would be returned.
|
|
724
|
+
*
|
|
725
|
+
* @template T Type of the input value
|
|
726
|
+
* @param input A value to be cloned
|
|
727
|
+
* @return Cloned data
|
|
728
|
+
*
|
|
729
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
730
|
+
*/
|
|
731
|
+
export declare function assertClone<T>(input: unknown): Primitive<T>;
|
|
732
|
+
/**
|
|
733
|
+
* Clone a data with type checking.
|
|
734
|
+
*
|
|
735
|
+
* Clones an instance following type `T`, with type checking. If the target `input`
|
|
736
|
+
* value or its member variable contains a class instance that is having a `toJSON()`
|
|
737
|
+
* method, its return value would be cloned.
|
|
738
|
+
*
|
|
739
|
+
* In such reason, when `input` value is not matched with the type `T`, it returns
|
|
740
|
+
* `null` value instead. Otherwise, there's no problem on the `input` value, cloned
|
|
741
|
+
* data would be returned.
|
|
742
|
+
*
|
|
743
|
+
* @template T Type of the input value
|
|
744
|
+
* @param input A value to be cloned
|
|
745
|
+
* @return Cloned data when exact type, otherwise null
|
|
746
|
+
*
|
|
747
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
748
|
+
*/
|
|
749
|
+
export declare function isClone<T>(input: T): Primitive<T> | null;
|
|
750
|
+
/**
|
|
751
|
+
* Clone a data with type checking.
|
|
752
|
+
*
|
|
753
|
+
* Clones an instance following type `T`, with type checking. If the target `input`
|
|
754
|
+
* value or its member variable contains a class instance that is having a `toJSON()`
|
|
755
|
+
* method, its return value would be cloned.
|
|
756
|
+
*
|
|
757
|
+
* In such reason, when `input` value is not matched with the type `T`, it returns
|
|
758
|
+
* `null` value instead. Otherwise, there's no problem on the `input` value, cloned
|
|
759
|
+
* data would be returned.
|
|
760
|
+
*
|
|
761
|
+
* @template T Type of the input value
|
|
762
|
+
* @param input A value to be cloned
|
|
763
|
+
* @return Cloned data when exact type, otherwise null
|
|
764
|
+
*
|
|
765
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
766
|
+
*/
|
|
767
|
+
export declare function isClone<T>(input: unknown): Primitive<T> | null;
|
|
768
|
+
/**
|
|
769
|
+
* Clone a data with detailed type validation.
|
|
770
|
+
*
|
|
771
|
+
* Clones an instance following type `T`, with detailed type validation. If the target
|
|
772
|
+
* `input` value or its member variable contains a class instance that is having a
|
|
773
|
+
* `toJSON()` method, its return value would be cloned.
|
|
774
|
+
*
|
|
775
|
+
* In such reason, when `input` value is not matched with the type `T`, it returns
|
|
776
|
+
* {@link IValidation.Failure} value. Otherwise, there's no problem on the `input`
|
|
777
|
+
* value, cloned data would be stored in `data` property of the output
|
|
778
|
+
* {@link IValidation.Success} instance.
|
|
779
|
+
*
|
|
780
|
+
* @template T Type of the input value
|
|
781
|
+
* @param input A value to be cloned
|
|
782
|
+
* @returns Validation result with cloned value
|
|
783
|
+
*/
|
|
784
|
+
export declare function validateClone<T>(input: T): IValidation<Primitive<T>>;
|
|
785
|
+
/**
|
|
786
|
+
* Clone a data with detailed type validation.
|
|
787
|
+
*
|
|
788
|
+
* Clones an instance following type `T`, with detailed type validation. If the target
|
|
789
|
+
* `input` value or its member variable contains a class instance that is having a
|
|
790
|
+
* `toJSON()` method, its return value would be cloned.
|
|
791
|
+
*
|
|
792
|
+
* In such reason, when `input` value is not matched with the type `T`, it returns
|
|
793
|
+
* {@link IValidation.Failure} value. Otherwise, there's no problem on the `input`
|
|
794
|
+
* value, cloned data would be stored in `data` property of the output
|
|
795
|
+
* {@link IValidation.Success} instance.
|
|
796
|
+
*
|
|
797
|
+
* @template T Type of the input value
|
|
798
|
+
* @param input A value to be cloned
|
|
799
|
+
* @returns Validation result with cloned value
|
|
800
|
+
*/
|
|
801
|
+
export declare function validateClone<T>(input: unknown): IValidation<Primitive<T>>;
|
|
659
802
|
/**
|
|
660
803
|
* Prune, erase superfluous properties.
|
|
661
804
|
*
|
|
@@ -1058,8 +1201,101 @@ export declare function createValidateStringify(): never;
|
|
|
1058
1201
|
* @author Jeongho Nam - https://github.com/samchon
|
|
1059
1202
|
*/
|
|
1060
1203
|
export declare function createValidateStringify<T>(): (input: unknown) => IValidation<string>;
|
|
1204
|
+
/**
|
|
1205
|
+
* Creates a reusable {@link random} function.
|
|
1206
|
+
*
|
|
1207
|
+
* @danger You have to specify the generic argument `T`
|
|
1208
|
+
* @return Nothing until specifying the generic argument `T`
|
|
1209
|
+
* @throws compile error
|
|
1210
|
+
*
|
|
1211
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1212
|
+
*/
|
|
1213
|
+
export declare function createRandom(): never;
|
|
1214
|
+
/**
|
|
1215
|
+
* Creates a resuable {@link random} function.
|
|
1216
|
+
*
|
|
1217
|
+
* @template T Type of the input value
|
|
1218
|
+
* @returns A reusable `random` function
|
|
1219
|
+
*
|
|
1220
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1221
|
+
*/
|
|
1222
|
+
export declare function createRandom<T>(): () => Primitive<T>;
|
|
1223
|
+
/**
|
|
1224
|
+
* Creates a reusable {@link clone} function.
|
|
1225
|
+
*
|
|
1226
|
+
* @danger You have to specify the generic argument `T`
|
|
1227
|
+
* @return Nothing until specifying the generic argument `T`
|
|
1228
|
+
* @throws compile error
|
|
1229
|
+
*
|
|
1230
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1231
|
+
*/
|
|
1061
1232
|
export declare function createClone(): never;
|
|
1062
|
-
|
|
1233
|
+
/**
|
|
1234
|
+
* Creates a resuable {@link clone} function.
|
|
1235
|
+
*
|
|
1236
|
+
* @template T Type of the input value
|
|
1237
|
+
* @returns A reusable `clone` function
|
|
1238
|
+
*
|
|
1239
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1240
|
+
*/
|
|
1241
|
+
export declare function createClone<T>(): (input: T) => Primitive<T>;
|
|
1242
|
+
/**
|
|
1243
|
+
* Creates a reusable {@link assertClone} function.
|
|
1244
|
+
*
|
|
1245
|
+
* @danger You have to specify the generic argument `T`
|
|
1246
|
+
* @return Nothing until specifying the generic argument `T`
|
|
1247
|
+
* @throws compile error
|
|
1248
|
+
*
|
|
1249
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1250
|
+
*/
|
|
1251
|
+
export declare function createAssertClone(): never;
|
|
1252
|
+
/**
|
|
1253
|
+
* Creates a resuable {@link assertClone} function.
|
|
1254
|
+
*
|
|
1255
|
+
* @template T Type of the input value
|
|
1256
|
+
* @returns A reusable `clone` function
|
|
1257
|
+
*
|
|
1258
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1259
|
+
*/
|
|
1260
|
+
export declare function createAssertClone<T>(): (input: unknown) => Primitive<T>;
|
|
1261
|
+
/**
|
|
1262
|
+
* Creates a reusable {@link isClone} function.
|
|
1263
|
+
*
|
|
1264
|
+
* @danger You have to specify the generic argument `T`
|
|
1265
|
+
* @return Nothing until specifying the generic argument `T`
|
|
1266
|
+
* @throws compile error
|
|
1267
|
+
*
|
|
1268
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1269
|
+
*/
|
|
1270
|
+
export declare function createIsClone(): never;
|
|
1271
|
+
/**
|
|
1272
|
+
* Creates a resuable {@link isClone} function.
|
|
1273
|
+
*
|
|
1274
|
+
* @template T Type of the input value
|
|
1275
|
+
* @returns A reusable `clone` function
|
|
1276
|
+
*
|
|
1277
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1278
|
+
*/
|
|
1279
|
+
export declare function createIsClone<T>(): (input: unknown) => Primitive<T> | null;
|
|
1280
|
+
/**
|
|
1281
|
+
* Creates a reusable {@link validateClone} function.
|
|
1282
|
+
*
|
|
1283
|
+
* @danger You have to specify the generic argument `T`
|
|
1284
|
+
* @return Nothing until specifying the generic argument `T`
|
|
1285
|
+
* @throws compile error
|
|
1286
|
+
*
|
|
1287
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1288
|
+
*/
|
|
1289
|
+
export declare function createValidateClone(): never;
|
|
1290
|
+
/**
|
|
1291
|
+
* Creates a resuable {@link validateClone} function.
|
|
1292
|
+
*
|
|
1293
|
+
* @template T Type of the input value
|
|
1294
|
+
* @returns A reusable `clone` function
|
|
1295
|
+
*
|
|
1296
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
1297
|
+
*/
|
|
1298
|
+
export declare function createValidateClone<T>(): (input: unknown) => IValidation<Primitive<T>>;
|
|
1063
1299
|
/**
|
|
1064
1300
|
* Creates a reusable {@link prune} function.
|
|
1065
1301
|
*
|