typia 9.7.0 → 9.7.2
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/AssertionGuard.d.mts +27 -25
- package/lib/AssertionGuard.d.ts +27 -25
- package/lib/CamelCase.d.mts +1 -1
- package/lib/CamelCase.d.ts +1 -1
- package/lib/IRandomGenerator.d.mts +44 -42
- package/lib/IRandomGenerator.d.ts +44 -42
- package/lib/IReadableURLSearchParams.d.mts +2 -2
- package/lib/IReadableURLSearchParams.d.ts +2 -2
- package/lib/PascalCase.d.mts +1 -1
- package/lib/PascalCase.d.ts +1 -1
- package/lib/Primitive.d.mts +20 -22
- package/lib/Primitive.d.ts +20 -22
- package/lib/Resolved.d.mts +16 -18
- package/lib/Resolved.d.ts +16 -18
- package/lib/SnakeCase.d.mts +3 -2
- package/lib/SnakeCase.d.ts +3 -2
- package/lib/TypeGuardError.d.mts +88 -61
- package/lib/TypeGuardError.d.ts +88 -61
- package/lib/TypeGuardError.js +40 -29
- package/lib/TypeGuardError.js.map +1 -1
- package/lib/TypeGuardError.mjs +70 -48
- package/lib/factories/MetadataCollection.js +4 -12
- package/lib/factories/MetadataCollection.js.map +1 -1
- package/lib/factories/MetadataCollection.mjs +4 -12
- package/lib/factories/MetadataCommentTagFactory.js +5 -15
- package/lib/factories/MetadataCommentTagFactory.js.map +1 -1
- package/lib/factories/MetadataCommentTagFactory.mjs +5 -15
- package/lib/factories/MetadataFactory.js +1 -3
- package/lib/factories/MetadataFactory.js.map +1 -1
- package/lib/factories/MetadataFactory.mjs +1 -3
- package/lib/factories/ProtobufFactory.js +1 -3
- package/lib/factories/ProtobufFactory.js.map +1 -1
- package/lib/factories/ProtobufFactory.mjs +1 -3
- package/lib/functional.d.mts +196 -195
- package/lib/functional.d.ts +196 -195
- package/lib/functional.js +18 -54
- package/lib/functional.js.map +1 -1
- package/lib/functional.mjs +18 -54
- package/lib/http.d.mts +303 -319
- package/lib/http.d.ts +303 -319
- package/lib/http.js +26 -78
- package/lib/http.js.map +1 -1
- package/lib/http.mjs +26 -78
- package/lib/internal/_ProtobufReader.d.mts +3 -9
- package/lib/internal/_ProtobufReader.d.ts +3 -9
- package/lib/internal/_ProtobufReader.js.map +1 -1
- package/lib/internal/_ProtobufReader.mjs +3 -9
- package/lib/internal/_ProtobufSizer.d.mts +4 -12
- package/lib/internal/_ProtobufSizer.d.ts +4 -12
- package/lib/internal/_ProtobufSizer.js.map +1 -1
- package/lib/internal/_ProtobufSizer.mjs +4 -12
- package/lib/internal/_ProtobufWriter.d.mts +5 -15
- package/lib/internal/_ProtobufWriter.d.ts +5 -15
- package/lib/internal/_ProtobufWriter.js.map +1 -1
- package/lib/internal/_ProtobufWriter.mjs +5 -15
- package/lib/internal/_jsonStringifyString.d.mts +4 -4
- package/lib/internal/_jsonStringifyString.d.ts +4 -4
- package/lib/internal/_jsonStringifyString.js +4 -4
- package/lib/internal/_jsonStringifyString.mjs +4 -4
- package/lib/json.d.mts +174 -195
- package/lib/json.d.ts +174 -195
- package/lib/json.js +16 -48
- package/lib/json.js.map +1 -1
- package/lib/json.mjs +16 -48
- package/lib/llm.d.mts +275 -192
- package/lib/llm.d.ts +275 -192
- package/lib/llm.js +4 -12
- package/lib/llm.js.map +1 -1
- package/lib/llm.mjs +4 -12
- package/lib/misc.d.mts +149 -172
- package/lib/misc.d.ts +149 -172
- package/lib/misc.js +17 -51
- package/lib/misc.js.map +1 -1
- package/lib/misc.mjs +17 -51
- package/lib/module.d.mts +263 -275
- package/lib/module.d.ts +263 -275
- package/lib/module.js +18 -54
- package/lib/module.js.map +1 -1
- package/lib/module.mjs +18 -54
- package/lib/notations.d.mts +153 -174
- package/lib/notations.d.ts +153 -174
- package/lib/notations.js +24 -72
- package/lib/notations.js.map +1 -1
- package/lib/notations.mjs +24 -72
- package/lib/programmers/FeatureProgrammer.d.mts +19 -41
- package/lib/programmers/FeatureProgrammer.d.ts +19 -41
- package/lib/programmers/FeatureProgrammer.js.map +1 -1
- package/lib/programmers/ImportProgrammer.js +3 -9
- package/lib/programmers/ImportProgrammer.js.map +1 -1
- package/lib/programmers/ImportProgrammer.mjs +3 -9
- package/lib/programmers/RandomProgrammer.js +6 -0
- package/lib/programmers/RandomProgrammer.js.map +1 -1
- package/lib/programmers/RandomProgrammer.mjs +6 -0
- package/lib/programmers/helpers/ProtobufWire.d.mts +13 -13
- package/lib/programmers/helpers/ProtobufWire.d.ts +13 -13
- package/lib/programmers/internal/check_array_length.js +2 -6
- package/lib/programmers/internal/check_array_length.js.map +1 -1
- package/lib/programmers/internal/check_array_length.mjs +2 -6
- package/lib/programmers/internal/check_bigint.js +2 -6
- package/lib/programmers/internal/check_bigint.js.map +1 -1
- package/lib/programmers/internal/check_bigint.mjs +2 -6
- package/lib/programmers/internal/check_dynamic_key.js +2 -6
- package/lib/programmers/internal/check_dynamic_key.js.map +1 -1
- package/lib/programmers/internal/check_dynamic_key.mjs +2 -6
- package/lib/programmers/internal/check_dynamic_properties.js +3 -9
- package/lib/programmers/internal/check_dynamic_properties.js.map +1 -1
- package/lib/programmers/internal/check_dynamic_properties.mjs +3 -9
- package/lib/programmers/internal/check_everything.js +1 -3
- package/lib/programmers/internal/check_everything.js.map +1 -1
- package/lib/programmers/internal/check_everything.mjs +1 -3
- package/lib/programmers/internal/check_native.js +2 -6
- package/lib/programmers/internal/check_native.js.map +1 -1
- package/lib/programmers/internal/check_native.mjs +2 -6
- package/lib/programmers/internal/check_number.js +2 -6
- package/lib/programmers/internal/check_number.js.map +1 -1
- package/lib/programmers/internal/check_number.mjs +2 -6
- package/lib/programmers/internal/check_object.js +2 -6
- package/lib/programmers/internal/check_object.js.map +1 -1
- package/lib/programmers/internal/check_object.mjs +2 -6
- package/lib/programmers/internal/check_string.js +2 -6
- package/lib/programmers/internal/check_string.js.map +1 -1
- package/lib/programmers/internal/check_string.mjs +2 -6
- package/lib/programmers/internal/check_template.js +1 -3
- package/lib/programmers/internal/check_template.js.map +1 -1
- package/lib/programmers/internal/check_template.mjs +1 -3
- package/lib/programmers/internal/check_union_array_like.js +1 -3
- package/lib/programmers/internal/check_union_array_like.js.map +1 -1
- package/lib/programmers/internal/check_union_array_like.mjs +1 -3
- package/lib/programmers/internal/decode_union_object.js +2 -6
- package/lib/programmers/internal/decode_union_object.js.map +1 -1
- package/lib/programmers/internal/decode_union_object.mjs +2 -6
- package/lib/programmers/internal/feature_object_entries.js +1 -3
- package/lib/programmers/internal/feature_object_entries.js.map +1 -1
- package/lib/programmers/internal/feature_object_entries.mjs +1 -3
- package/lib/programmers/internal/json_schema_escaped.js +2 -6
- package/lib/programmers/internal/json_schema_escaped.js.map +1 -1
- package/lib/programmers/internal/json_schema_escaped.mjs +2 -6
- package/lib/programmers/internal/json_schema_object.js +3 -9
- package/lib/programmers/internal/json_schema_object.js.map +1 -1
- package/lib/programmers/internal/json_schema_object.mjs +3 -9
- package/lib/programmers/internal/metadata_to_pattern.js +1 -3
- package/lib/programmers/internal/metadata_to_pattern.js.map +1 -1
- package/lib/programmers/internal/metadata_to_pattern.mjs +1 -3
- package/lib/programmers/internal/postfix_of_tuple.js +1 -3
- package/lib/programmers/internal/postfix_of_tuple.js.map +1 -1
- package/lib/programmers/internal/postfix_of_tuple.mjs +1 -3
- package/lib/programmers/internal/prune_object_properties.js +1 -3
- package/lib/programmers/internal/prune_object_properties.js.map +1 -1
- package/lib/programmers/internal/prune_object_properties.mjs +1 -3
- package/lib/programmers/internal/stringify_dynamic_properties.js +2 -6
- package/lib/programmers/internal/stringify_dynamic_properties.js.map +1 -1
- package/lib/programmers/internal/stringify_dynamic_properties.mjs +2 -6
- package/lib/programmers/internal/stringify_native.js +1 -3
- package/lib/programmers/internal/stringify_native.js.map +1 -1
- package/lib/programmers/internal/stringify_native.mjs +1 -3
- package/lib/programmers/internal/stringify_regular_properties.js +2 -6
- package/lib/programmers/internal/stringify_regular_properties.js.map +1 -1
- package/lib/programmers/internal/stringify_regular_properties.mjs +2 -6
- package/lib/programmers/internal/template_to_pattern.js +1 -3
- package/lib/programmers/internal/template_to_pattern.js.map +1 -1
- package/lib/programmers/internal/template_to_pattern.mjs +1 -3
- package/lib/programmers/internal/wrap_metadata_rest_tuple.js +1 -3
- package/lib/programmers/internal/wrap_metadata_rest_tuple.js.map +1 -1
- package/lib/programmers/internal/wrap_metadata_rest_tuple.mjs +1 -3
- package/lib/protobuf.d.mts +290 -297
- package/lib/protobuf.d.ts +290 -297
- package/lib/protobuf.js +17 -51
- package/lib/protobuf.js.map +1 -1
- package/lib/protobuf.mjs +17 -51
- package/lib/reflect.d.mts +2 -4
- package/lib/reflect.d.ts +2 -4
- package/lib/reflect.js +1 -3
- package/lib/reflect.js.map +1 -1
- package/lib/reflect.mjs +1 -3
- package/lib/schemas/json/IJsonApplication.d.mts +4 -4
- package/lib/schemas/json/IJsonApplication.d.ts +4 -4
- package/lib/schemas/json/IJsonSchemaCollection.d.mts +73 -56
- package/lib/schemas/json/IJsonSchemaCollection.d.ts +73 -56
- package/lib/schemas/json/IJsonSchemaUnit.d.mts +83 -70
- package/lib/schemas/json/IJsonSchemaUnit.d.ts +83 -70
- package/lib/schemas/metadata/Metadata.d.mts +1 -3
- package/lib/schemas/metadata/Metadata.d.ts +1 -3
- package/lib/schemas/metadata/Metadata.js +9 -27
- package/lib/schemas/metadata/Metadata.js.map +1 -1
- package/lib/schemas/metadata/Metadata.mjs +9 -27
- package/lib/schemas/metadata/MetadataAliasType.d.mts +1 -3
- package/lib/schemas/metadata/MetadataAliasType.d.ts +1 -3
- package/lib/schemas/metadata/MetadataAliasType.js +3 -9
- package/lib/schemas/metadata/MetadataAliasType.js.map +1 -1
- package/lib/schemas/metadata/MetadataAliasType.mjs +3 -9
- package/lib/schemas/metadata/MetadataApplication.d.mts +1 -3
- package/lib/schemas/metadata/MetadataApplication.d.ts +1 -3
- package/lib/schemas/metadata/MetadataApplication.js +2 -6
- package/lib/schemas/metadata/MetadataApplication.js.map +1 -1
- package/lib/schemas/metadata/MetadataApplication.mjs +2 -6
- package/lib/schemas/metadata/MetadataArray.d.mts +1 -3
- package/lib/schemas/metadata/MetadataArray.d.ts +1 -3
- package/lib/schemas/metadata/MetadataArray.js +1 -3
- package/lib/schemas/metadata/MetadataArray.js.map +1 -1
- package/lib/schemas/metadata/MetadataArray.mjs +1 -3
- package/lib/schemas/metadata/MetadataArrayType.d.mts +1 -3
- package/lib/schemas/metadata/MetadataArrayType.d.ts +1 -3
- package/lib/schemas/metadata/MetadataArrayType.js +3 -9
- package/lib/schemas/metadata/MetadataArrayType.js.map +1 -1
- package/lib/schemas/metadata/MetadataArrayType.mjs +3 -9
- package/lib/schemas/metadata/MetadataAtomic.js +1 -3
- package/lib/schemas/metadata/MetadataAtomic.js.map +1 -1
- package/lib/schemas/metadata/MetadataAtomic.mjs +1 -3
- package/lib/schemas/metadata/MetadataEscaped.d.mts +1 -3
- package/lib/schemas/metadata/MetadataEscaped.d.ts +1 -3
- package/lib/schemas/metadata/MetadataEscaped.js +3 -9
- package/lib/schemas/metadata/MetadataEscaped.js.map +1 -1
- package/lib/schemas/metadata/MetadataEscaped.mjs +3 -9
- package/lib/schemas/metadata/MetadataFunction.d.mts +1 -3
- package/lib/schemas/metadata/MetadataFunction.d.ts +1 -3
- package/lib/schemas/metadata/MetadataFunction.js +2 -6
- package/lib/schemas/metadata/MetadataFunction.js.map +1 -1
- package/lib/schemas/metadata/MetadataFunction.mjs +2 -6
- package/lib/schemas/metadata/MetadataObject.d.mts +1 -3
- package/lib/schemas/metadata/MetadataObject.d.ts +1 -3
- package/lib/schemas/metadata/MetadataObject.js +1 -3
- package/lib/schemas/metadata/MetadataObject.js.map +1 -1
- package/lib/schemas/metadata/MetadataObject.mjs +1 -3
- package/lib/schemas/metadata/MetadataObjectType.d.mts +1 -3
- package/lib/schemas/metadata/MetadataObjectType.d.ts +1 -3
- package/lib/schemas/metadata/MetadataObjectType.js +5 -15
- package/lib/schemas/metadata/MetadataObjectType.js.map +1 -1
- package/lib/schemas/metadata/MetadataObjectType.mjs +6 -18
- package/lib/schemas/metadata/MetadataParameter.js +1 -3
- package/lib/schemas/metadata/MetadataParameter.js.map +1 -1
- package/lib/schemas/metadata/MetadataParameter.mjs +1 -3
- package/lib/schemas/metadata/MetadataProperty.d.mts +1 -3
- package/lib/schemas/metadata/MetadataProperty.d.ts +1 -3
- package/lib/schemas/metadata/MetadataProperty.js +3 -9
- package/lib/schemas/metadata/MetadataProperty.js.map +1 -1
- package/lib/schemas/metadata/MetadataProperty.mjs +3 -9
- package/lib/schemas/metadata/MetadataTemplate.js +1 -3
- package/lib/schemas/metadata/MetadataTemplate.js.map +1 -1
- package/lib/schemas/metadata/MetadataTemplate.mjs +1 -3
- package/lib/schemas/metadata/MetadataTuple.d.mts +1 -3
- package/lib/schemas/metadata/MetadataTuple.d.ts +1 -3
- package/lib/schemas/metadata/MetadataTuple.js +2 -6
- package/lib/schemas/metadata/MetadataTuple.js.map +1 -1
- package/lib/schemas/metadata/MetadataTuple.mjs +2 -6
- package/lib/schemas/metadata/MetadataTupleType.js +2 -6
- package/lib/schemas/metadata/MetadataTupleType.js.map +1 -1
- package/lib/schemas/metadata/MetadataTupleType.mjs +3 -9
- package/lib/tags/Constant.d.mts +32 -0
- package/lib/tags/Constant.d.ts +32 -0
- package/lib/tags/ContentMediaType.d.mts +17 -0
- package/lib/tags/ContentMediaType.d.ts +17 -0
- package/lib/tags/Default.d.mts +30 -0
- package/lib/tags/Default.d.ts +30 -0
- package/lib/tags/Example.d.mts +32 -0
- package/lib/tags/Example.d.ts +32 -0
- package/lib/tags/Examples.d.mts +40 -0
- package/lib/tags/Examples.d.ts +40 -0
- package/lib/tags/ExclusiveMaximum.d.mts +21 -0
- package/lib/tags/ExclusiveMaximum.d.ts +21 -0
- package/lib/tags/ExclusiveMinimum.d.mts +21 -0
- package/lib/tags/ExclusiveMinimum.d.ts +21 -0
- package/lib/tags/Format.d.mts +28 -0
- package/lib/tags/Format.d.ts +28 -0
- package/lib/tags/JsonSchemaPlugin.d.mts +28 -0
- package/lib/tags/JsonSchemaPlugin.d.ts +28 -0
- package/lib/tags/MaxItems.d.mts +19 -0
- package/lib/tags/MaxItems.d.ts +19 -0
- package/lib/tags/MaxLength.d.mts +13 -0
- package/lib/tags/MaxLength.d.ts +13 -0
- package/lib/tags/Maximum.d.mts +20 -0
- package/lib/tags/Maximum.d.ts +20 -0
- package/lib/tags/MinItems.d.mts +19 -0
- package/lib/tags/MinItems.d.ts +19 -0
- package/lib/tags/MinLength.d.mts +13 -0
- package/lib/tags/MinLength.d.ts +13 -0
- package/lib/tags/Minimum.d.mts +20 -0
- package/lib/tags/Minimum.d.ts +20 -0
- package/lib/tags/MultipleOf.d.mts +21 -0
- package/lib/tags/MultipleOf.d.ts +21 -0
- package/lib/tags/Pattern.d.mts +18 -0
- package/lib/tags/Pattern.d.ts +18 -0
- package/lib/tags/Sequence.d.mts +27 -0
- package/lib/tags/Sequence.d.ts +27 -0
- package/lib/tags/TagBase.d.mts +38 -18
- package/lib/tags/TagBase.d.ts +38 -18
- package/lib/tags/Type.d.mts +27 -0
- package/lib/tags/Type.d.ts +27 -0
- package/lib/tags/UniqueItems.d.mts +20 -0
- package/lib/tags/UniqueItems.d.ts +20 -0
- package/lib/tags/internal/FormatCheatSheet.d.mts +1 -3
- package/lib/tags/internal/FormatCheatSheet.d.ts +1 -3
- package/lib/tags/internal/FormatCheatSheet.js +1 -3
- package/lib/tags/internal/FormatCheatSheet.js.map +1 -1
- package/lib/tags/internal/FormatCheatSheet.mjs +1 -3
- package/lib/transformers/ITransformOptions.d.mts +27 -19
- package/lib/transformers/ITransformOptions.d.ts +27 -19
- package/lib/transformers/ImportTransformer.js +114 -1
- package/lib/transformers/ImportTransformer.js.map +1 -1
- package/lib/transformers/ImportTransformer.mjs +114 -1
- package/lib/transformers/NoTransformConfigurationError.js +1 -3
- package/lib/transformers/NoTransformConfigurationError.js.map +1 -1
- package/lib/transformers/NoTransformConfigurationError.mjs +1 -3
- package/lib/transformers/features/llm/LlmApplicationTransformer.js +1 -3
- package/lib/transformers/features/llm/LlmApplicationTransformer.js.map +1 -1
- package/lib/transformers/features/llm/LlmApplicationTransformer.mjs +1 -3
- package/lib/typings/Equal.d.mts +6 -6
- package/lib/typings/Equal.d.ts +6 -6
- package/package.json +2 -1
- package/src/AssertionGuard.ts +27 -25
- package/src/CamelCase.ts +1 -1
- package/src/IRandomGenerator.ts +57 -47
- package/src/IReadableURLSearchParams.ts +2 -2
- package/src/PascalCase.ts +1 -1
- package/src/Primitive.ts +20 -22
- package/src/Resolved.ts +16 -18
- package/src/SnakeCase.ts +3 -2
- package/src/TypeGuardError.ts +101 -64
- package/src/factories/MetadataCollection.ts +4 -12
- package/src/factories/MetadataCommentTagFactory.ts +8 -24
- package/src/factories/MetadataFactory.ts +1 -3
- package/src/factories/ProtobufFactory.ts +1 -3
- package/src/functional.ts +214 -249
- package/src/http.ts +329 -397
- package/src/internal/_ProtobufReader.ts +3 -9
- package/src/internal/_ProtobufSizer.ts +4 -12
- package/src/internal/_ProtobufWriter.ts +5 -15
- package/src/internal/_jsonStringifyString.ts +4 -4
- package/src/json.ts +190 -243
- package/src/llm.ts +279 -204
- package/src/misc.ts +166 -223
- package/src/module.ts +281 -329
- package/src/notations.ts +177 -246
- package/src/programmers/FeatureProgrammer.ts +19 -41
- package/src/programmers/ImportProgrammer.ts +3 -9
- package/src/programmers/RandomProgrammer.ts +6 -1
- package/src/programmers/helpers/ProtobufWire.ts +13 -13
- package/src/programmers/internal/check_array_length.ts +2 -6
- package/src/programmers/internal/check_bigint.ts +2 -6
- package/src/programmers/internal/check_dynamic_key.ts +2 -6
- package/src/programmers/internal/check_dynamic_properties.ts +3 -9
- package/src/programmers/internal/check_everything.ts +1 -3
- package/src/programmers/internal/check_native.ts +2 -6
- package/src/programmers/internal/check_number.ts +2 -6
- package/src/programmers/internal/check_object.ts +3 -9
- package/src/programmers/internal/check_string.ts +2 -6
- package/src/programmers/internal/check_template.ts +1 -3
- package/src/programmers/internal/check_union_array_like.ts +2 -6
- package/src/programmers/internal/decode_union_object.ts +3 -9
- package/src/programmers/internal/feature_object_entries.ts +1 -3
- package/src/programmers/internal/json_schema_escaped.ts +2 -6
- package/src/programmers/internal/json_schema_object.ts +4 -12
- package/src/programmers/internal/metadata_to_pattern.ts +1 -3
- package/src/programmers/internal/postfix_of_tuple.ts +1 -3
- package/src/programmers/internal/prune_object_properties.ts +1 -3
- package/src/programmers/internal/stringify_dynamic_properties.ts +2 -6
- package/src/programmers/internal/stringify_native.ts +1 -3
- package/src/programmers/internal/stringify_regular_properties.ts +2 -6
- package/src/programmers/internal/template_to_pattern.ts +1 -3
- package/src/programmers/internal/wrap_metadata_rest_tuple.ts +1 -3
- package/src/protobuf.ts +307 -348
- package/src/reflect.ts +3 -7
- package/src/schemas/json/IJsonApplication.ts +4 -4
- package/src/schemas/json/IJsonSchemaCollection.ts +73 -56
- package/src/schemas/json/IJsonSchemaUnit.ts +83 -70
- package/src/schemas/metadata/IMetadataTypeTag.ts +1 -3
- package/src/schemas/metadata/Metadata.ts +9 -27
- package/src/schemas/metadata/MetadataAliasType.ts +3 -9
- package/src/schemas/metadata/MetadataApplication.ts +2 -6
- package/src/schemas/metadata/MetadataArray.ts +1 -3
- package/src/schemas/metadata/MetadataArrayType.ts +3 -9
- package/src/schemas/metadata/MetadataAtomic.ts +1 -3
- package/src/schemas/metadata/MetadataEscaped.ts +3 -9
- package/src/schemas/metadata/MetadataFunction.ts +2 -6
- package/src/schemas/metadata/MetadataObject.ts +1 -3
- package/src/schemas/metadata/MetadataObjectType.ts +6 -18
- package/src/schemas/metadata/MetadataParameter.ts +1 -3
- package/src/schemas/metadata/MetadataProperty.ts +3 -9
- package/src/schemas/metadata/MetadataTemplate.ts +1 -3
- package/src/schemas/metadata/MetadataTuple.ts +2 -6
- package/src/schemas/metadata/MetadataTupleType.ts +3 -9
- package/src/tags/Constant.ts +32 -0
- package/src/tags/ContentMediaType.ts +17 -0
- package/src/tags/Default.ts +30 -0
- package/src/tags/Example.ts +32 -0
- package/src/tags/Examples.ts +40 -0
- package/src/tags/ExclusiveMaximum.ts +21 -0
- package/src/tags/ExclusiveMinimum.ts +21 -0
- package/src/tags/Format.ts +28 -0
- package/src/tags/JsonSchemaPlugin.ts +28 -0
- package/src/tags/MaxItems.ts +19 -0
- package/src/tags/MaxLength.ts +13 -0
- package/src/tags/Maximum.ts +20 -0
- package/src/tags/MinItems.ts +19 -0
- package/src/tags/MinLength.ts +13 -0
- package/src/tags/Minimum.ts +20 -0
- package/src/tags/MultipleOf.ts +21 -0
- package/src/tags/Pattern.ts +18 -0
- package/src/tags/Sequence.ts +27 -0
- package/src/tags/TagBase.ts +38 -18
- package/src/tags/Type.ts +27 -0
- package/src/tags/UniqueItems.ts +20 -0
- package/src/tags/internal/FormatCheatSheet.ts +1 -3
- package/src/transformers/ITransformOptions.ts +27 -19
- package/src/transformers/ImportTransformer.ts +173 -1
- package/src/transformers/NoTransformConfigurationError.ts +1 -3
- package/src/transformers/features/llm/LlmApplicationTransformer.ts +1 -3
- package/src/typings/Equal.ts +6 -6
package/lib/module.d.ts
CHANGED
|
@@ -30,148 +30,152 @@ export * from "./IReadableURLSearchParams";
|
|
|
30
30
|
/**
|
|
31
31
|
* Asserts a value type.
|
|
32
32
|
*
|
|
33
|
-
* Asserts a parametric value type and throws a {@link TypeGuardError} with a
|
|
34
|
-
* reason, if the parametric value is not following the type `T`.
|
|
35
|
-
* value is following the type `T`, the input parameter will
|
|
33
|
+
* Asserts a parametric value type and throws a {@link TypeGuardError} with a
|
|
34
|
+
* detailed reason, if the parametric value is not following the type `T`.
|
|
35
|
+
* Otherwise, if the value is following the type `T`, the input parameter will
|
|
36
|
+
* be returned.
|
|
36
37
|
*
|
|
37
|
-
* If what you want is not asserting but just knowing whether the parametric
|
|
38
|
-
* following the type `T` or not, you can choose the {@link is} function
|
|
39
|
-
* Otherwise, if you want to know all the errors, {@link validate} is
|
|
40
|
-
* Also, if you want to automatically cast the parametric value
|
|
41
|
-
* when there is no problem (perform the assertion guard of
|
|
38
|
+
* If what you want is not asserting but just knowing whether the parametric
|
|
39
|
+
* value is following the type `T` or not, you can choose the {@link is} function
|
|
40
|
+
* instead. Otherwise, if you want to know all the errors, {@link validate} is
|
|
41
|
+
* the way to go. Also, if you want to automatically cast the parametric value
|
|
42
|
+
* to the type `T` when there is no problem (perform the assertion guard of
|
|
43
|
+
* type).
|
|
42
44
|
*
|
|
43
|
-
* On the other hand, if you don't want to allow any superfluous property that
|
|
44
|
-
* enrolled to the type `T`, you can use {@link assertEquals} function
|
|
45
|
+
* On the other hand, if you don't want to allow any superfluous property that
|
|
46
|
+
* is not enrolled to the type `T`, you can use {@link assertEquals} function
|
|
47
|
+
* instead.
|
|
45
48
|
*
|
|
49
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
46
50
|
* @template T Type of the input value
|
|
47
51
|
* @param input A value to be asserted
|
|
48
52
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
49
53
|
* @returns Parametric input value
|
|
50
54
|
* @throws A {@link TypeGuardError} instance with a detailed reason
|
|
51
|
-
*
|
|
52
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
53
55
|
*/
|
|
54
56
|
export declare function assert<T>(input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): T;
|
|
55
57
|
/**
|
|
56
58
|
* Asserts a value type.
|
|
57
59
|
*
|
|
58
|
-
* Asserts a parametric value type and throws a {@link TypeGuardError} with a
|
|
59
|
-
* reason, if the parametric value is not following the type `T`.
|
|
60
|
-
* value is following the type `T`, the input parameter will
|
|
60
|
+
* Asserts a parametric value type and throws a {@link TypeGuardError} with a
|
|
61
|
+
* detailed reason, if the parametric value is not following the type `T`.
|
|
62
|
+
* Otherwise, if the value is following the type `T`, the input parameter will
|
|
63
|
+
* be returned.
|
|
61
64
|
*
|
|
62
|
-
* If what you want is not asserting but just knowing whether the parametric
|
|
63
|
-
* following the type `T` or not, you can choose the {@link is} function
|
|
64
|
-
* Otherwise, if you want to know all the errors, {@link validate} is
|
|
65
|
+
* If what you want is not asserting but just knowing whether the parametric
|
|
66
|
+
* value is following the type `T` or not, you can choose the {@link is} function
|
|
67
|
+
* instead. Otherwise, if you want to know all the errors, {@link validate} is
|
|
68
|
+
* the way to go.
|
|
65
69
|
*
|
|
66
|
-
* On the other hand, if you don't want to allow any superfluous property that
|
|
67
|
-
* enrolled to the type `T`, you can use {@link assertEquals} function
|
|
70
|
+
* On the other hand, if you don't want to allow any superfluous property that
|
|
71
|
+
* is not enrolled to the type `T`, you can use {@link assertEquals} function
|
|
72
|
+
* instead.
|
|
68
73
|
*
|
|
74
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
69
75
|
* @template T Type of the input value
|
|
70
76
|
* @param input A value to be asserted
|
|
71
77
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
72
78
|
* @returns Parametric input value casted as `T`
|
|
73
79
|
* @throws A {@link TypeGuardError} instance with a detailed reason
|
|
74
|
-
*
|
|
75
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
76
80
|
*/
|
|
77
81
|
export declare function assert<T>(input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): T;
|
|
78
82
|
/**
|
|
79
83
|
* Assertion guard of a value type.
|
|
80
84
|
*
|
|
81
|
-
* Asserts a parametric value type and throws a {@link TypeGuardError} with a
|
|
82
|
-
* reason, if the parametric value is not following the type `T`.
|
|
83
|
-
* value is following the type `T`, nothing will be returned,
|
|
84
|
-
* will be automatically casted to the type `T`. This is the
|
|
85
|
-
* "Assertion Guard" of a value type.
|
|
85
|
+
* Asserts a parametric value type and throws a {@link TypeGuardError} with a
|
|
86
|
+
* detailed reason, if the parametric value is not following the type `T`.
|
|
87
|
+
* Otherwise, if the value is following the type `T`, nothing will be returned,
|
|
88
|
+
* but the input value will be automatically casted to the type `T`. This is the
|
|
89
|
+
* concept of "Assertion Guard" of a value type.
|
|
86
90
|
*
|
|
87
|
-
* If what you want is not asserting but just knowing whether the parametric
|
|
88
|
-
* following the type `T` or not, you can choose the {@link is} function
|
|
89
|
-
* Otherwise, if you want to know all the errors, {@link validate} is
|
|
90
|
-
* Also, if you want to return the parametric value when there is
|
|
91
|
-
* {@link assert} function instead.
|
|
91
|
+
* If what you want is not asserting but just knowing whether the parametric
|
|
92
|
+
* value is following the type `T` or not, you can choose the {@link is} function
|
|
93
|
+
* instead. Otherwise, if you want to know all the errors, {@link validate} is
|
|
94
|
+
* the way to go. Also, if you want to return the parametric value when there is
|
|
95
|
+
* no problem, you can use {@link assert} function instead.
|
|
92
96
|
*
|
|
93
|
-
* On the other hand, if you don't want to allow any superfluous property that
|
|
94
|
-
* enrolled to the type `T`, you can use {@link assertGuardEquals}
|
|
97
|
+
* On the other hand, if you don't want to allow any superfluous property that
|
|
98
|
+
* is not enrolled to the type `T`, you can use {@link assertGuardEquals}
|
|
99
|
+
* function instead.
|
|
95
100
|
*
|
|
101
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
96
102
|
* @template T Type of the input value
|
|
97
103
|
* @param input A value to be asserted
|
|
98
104
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
99
105
|
* @throws A {@link TypeGuardError} instance with a detailed reason
|
|
100
|
-
*
|
|
101
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
102
106
|
*/
|
|
103
107
|
export declare function assertGuard<T>(input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): asserts input is T;
|
|
104
108
|
/**
|
|
105
109
|
* Assertion guard of a value type.
|
|
106
110
|
*
|
|
107
|
-
* Asserts a parametric value type and throws a {@link TypeGuardError} with a
|
|
108
|
-
* reason, if the parametric value is not following the type `T`.
|
|
109
|
-
* value is following the type `T`, nothing will be returned,
|
|
110
|
-
* will be automatically casted to the type `T`. This is the
|
|
111
|
-
* "Assertion Guard" of a value type.
|
|
111
|
+
* Asserts a parametric value type and throws a {@link TypeGuardError} with a
|
|
112
|
+
* detailed reason, if the parametric value is not following the type `T`.
|
|
113
|
+
* Otherwise, if the value is following the type `T`, nothing will be returned,
|
|
114
|
+
* but the input value will be automatically casted to the type `T`. This is the
|
|
115
|
+
* concept of "Assertion Guard" of a value type.
|
|
112
116
|
*
|
|
113
|
-
* If what you want is not asserting but just knowing whether the parametric
|
|
114
|
-
* following the type `T` or not, you can choose the {@link is} function
|
|
115
|
-
* Otherwise, if you want to know all the errors, {@link validate} is
|
|
116
|
-
* Also, if you want to return the parametric value when there is
|
|
117
|
-
* {@link assert} function instead.
|
|
117
|
+
* If what you want is not asserting but just knowing whether the parametric
|
|
118
|
+
* value is following the type `T` or not, you can choose the {@link is} function
|
|
119
|
+
* instead. Otherwise, if you want to know all the errors, {@link validate} is
|
|
120
|
+
* the way to go. Also, if you want to return the parametric value when there is
|
|
121
|
+
* no problem, you can use {@link assert} function instead.
|
|
118
122
|
*
|
|
119
|
-
* On the other hand, if you don't want to allow any superfluous property that
|
|
120
|
-
* enrolled to the type `T`, you can use {@link assertGuardEquals}
|
|
123
|
+
* On the other hand, if you don't want to allow any superfluous property that
|
|
124
|
+
* is not enrolled to the type `T`, you can use {@link assertGuardEquals}
|
|
125
|
+
* function instead.
|
|
121
126
|
*
|
|
127
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
122
128
|
* @template T Type of the input value
|
|
123
129
|
* @param input A value to be asserted
|
|
124
130
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
125
131
|
* @throws A {@link TypeGuardError} instance with a detailed reason
|
|
126
|
-
*
|
|
127
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
128
132
|
*/
|
|
129
133
|
export declare function assertGuard<T>(input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): asserts input is T;
|
|
130
134
|
/**
|
|
131
135
|
* Tests a value type.
|
|
132
136
|
*
|
|
133
|
-
* Tests a parametric value type and returns whether it's following the type `T`
|
|
134
|
-
* If the parametric value is matched with the type `T`, `true` value
|
|
135
|
-
* Otherwise, if the parametric value is not following the
|
|
136
|
-
* returned.
|
|
137
|
+
* Tests a parametric value type and returns whether it's following the type `T`
|
|
138
|
+
* or not. If the parametric value is matched with the type `T`, `true` value
|
|
139
|
+
* will be returned. Otherwise, if the parametric value is not following the
|
|
140
|
+
* type `T`, `false` value will be returned.
|
|
137
141
|
*
|
|
138
|
-
* If what you want is not just knowing whether the parametric value is
|
|
139
|
-
* type `T` or not, but throwing an exception with a detailed
|
|
140
|
-
* {@link assert} function instead. Also, if you want to
|
|
141
|
-
* detailed reasons, {@link validate} function will be
|
|
142
|
+
* If what you want is not just knowing whether the parametric value is
|
|
143
|
+
* following the type `T` or not, but throwing an exception with a detailed
|
|
144
|
+
* reason, you can choose {@link assert} function instead. Also, if you want to
|
|
145
|
+
* know all the errors with detailed reasons, {@link validate} function will be
|
|
146
|
+
* useful.
|
|
142
147
|
*
|
|
143
|
-
* On the other hand, if you don't want to allow any superfluous property that
|
|
144
|
-
* enrolled to the type `T`, you can use {@link equals} function instead.
|
|
148
|
+
* On the other hand, if you don't want to allow any superfluous property that
|
|
149
|
+
* is not enrolled to the type `T`, you can use {@link equals} function instead.
|
|
145
150
|
*
|
|
151
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
146
152
|
* @template T Type of the input value
|
|
147
153
|
* @param input A value to be tested
|
|
148
154
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
149
155
|
* @returns Whether the parametric value is following the type `T` or not
|
|
150
|
-
*
|
|
151
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
152
156
|
*/
|
|
153
157
|
export declare function is<T>(input: T): input is T;
|
|
154
158
|
/**
|
|
155
159
|
* Tests a value type.
|
|
156
160
|
*
|
|
157
|
-
* Tests a parametric value type and returns whether it's following the type `T`
|
|
158
|
-
* If the parametric value is matched with the type `T`, `true` value
|
|
159
|
-
* Otherwise, if the parametric value is not following the
|
|
160
|
-
* returned.
|
|
161
|
+
* Tests a parametric value type and returns whether it's following the type `T`
|
|
162
|
+
* or not. If the parametric value is matched with the type `T`, `true` value
|
|
163
|
+
* will be returned. Otherwise, if the parametric value is not following the
|
|
164
|
+
* type `T`, `false` value will be returned.
|
|
161
165
|
*
|
|
162
|
-
* If what you want is not just knowing whether the parametric value is
|
|
163
|
-
* type `T` or not, but throwing an exception with a detailed
|
|
164
|
-
* {@link assert} function instead. Also, if you want to
|
|
165
|
-
* detailed reasons, {@link validate} function will be
|
|
166
|
+
* If what you want is not just knowing whether the parametric value is
|
|
167
|
+
* following the type `T` or not, but throwing an exception with a detailed
|
|
168
|
+
* reason, you can choose {@link assert} function instead. Also, if you want to
|
|
169
|
+
* know all the errors with detailed reasons, {@link validate} function will be
|
|
170
|
+
* useful.
|
|
166
171
|
*
|
|
167
|
-
* On the other hand, if you don't want to allow any superfluous property that
|
|
168
|
-
* enrolled to the type `T`, you can use {@link equals} function instead.
|
|
172
|
+
* On the other hand, if you don't want to allow any superfluous property that
|
|
173
|
+
* is not enrolled to the type `T`, you can use {@link equals} function instead.
|
|
169
174
|
*
|
|
175
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
170
176
|
* @template T Type of the input value
|
|
171
177
|
* @param input A value to be tested
|
|
172
178
|
* @returns Whether the parametric value is following the type `T` or not
|
|
173
|
-
*
|
|
174
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
175
179
|
*/
|
|
176
180
|
export declare function is<T>(input: unknown): input is T;
|
|
177
181
|
/**
|
|
@@ -183,19 +187,19 @@ export declare function is<T>(input: unknown): input is T;
|
|
|
183
187
|
* {@link IValidation.errors} array will be empty and {@link IValidation.success}
|
|
184
188
|
* will have the `true` value.
|
|
185
189
|
*
|
|
186
|
-
* If what you want is not finding all the errors, but asserting the parametric
|
|
187
|
-
* type with exception throwing, you can choose {@link assert} function
|
|
188
|
-
* Otherwise, if you just want to know whether the parametric value is
|
|
189
|
-
* type `T`, {@link is} function is the way to go.
|
|
190
|
+
* If what you want is not finding all the errors, but asserting the parametric
|
|
191
|
+
* value type with exception throwing, you can choose {@link assert} function
|
|
192
|
+
* instead. Otherwise, if you just want to know whether the parametric value is
|
|
193
|
+
* matched with the type `T`, {@link is} function is the way to go.
|
|
190
194
|
*
|
|
191
|
-
* On the other hand, if you don't want to allow any superfluous property that
|
|
192
|
-
* enrolled to the type `T`, you can use {@link validateEquals} function
|
|
195
|
+
* On the other hand, if you don't want to allow any superfluous property that
|
|
196
|
+
* is not enrolled to the type `T`, you can use {@link validateEquals} function
|
|
197
|
+
* instead.
|
|
193
198
|
*
|
|
199
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
194
200
|
* @template T Type of the input value
|
|
195
201
|
* @param input A value to be validated
|
|
196
202
|
* @returns Validation result
|
|
197
|
-
*
|
|
198
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
199
203
|
*/
|
|
200
204
|
export declare function validate<T>(input: T): IValidation<T>;
|
|
201
205
|
/**
|
|
@@ -207,175 +211,179 @@ export declare function validate<T>(input: T): IValidation<T>;
|
|
|
207
211
|
* {@link IValidation.errors} array will be empty and {@link IValidation.success}
|
|
208
212
|
* will have the `true` value.
|
|
209
213
|
*
|
|
210
|
-
* If what you want is not finding all the errors, but asserting the parametric
|
|
211
|
-
* type with exception throwing, you can choose {@link assert} function
|
|
212
|
-
* Otherwise, if you just want to know whether the parametric value is
|
|
213
|
-
* type `T`, {@link is} function is the way to go.
|
|
214
|
+
* If what you want is not finding all the errors, but asserting the parametric
|
|
215
|
+
* value type with exception throwing, you can choose {@link assert} function
|
|
216
|
+
* instead. Otherwise, if you just want to know whether the parametric value is
|
|
217
|
+
* matched with the type `T`, {@link is} function is the way to go.
|
|
214
218
|
*
|
|
215
|
-
* On the other hand, if you don't want to allow any superfluous property that
|
|
216
|
-
* enrolled to the type `T`, you can use {@link validateEquals} function
|
|
219
|
+
* On the other hand, if you don't want to allow any superfluous property that
|
|
220
|
+
* is not enrolled to the type `T`, you can use {@link validateEquals} function
|
|
221
|
+
* instead.
|
|
217
222
|
*
|
|
223
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
218
224
|
* @template T Type of the input value
|
|
219
225
|
* @param input A value to be validated
|
|
220
226
|
* @returns Validation result
|
|
221
|
-
*
|
|
222
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
223
227
|
*/
|
|
224
228
|
export declare function validate<T>(input: unknown): IValidation<T>;
|
|
225
229
|
/**
|
|
226
230
|
* Asserts equality between a value and its type.
|
|
227
231
|
*
|
|
228
|
-
* Asserts a parametric value type and throws a {@link TypeGuardError} with
|
|
229
|
-
* reason, if the parametric value is not following the type `T` or
|
|
230
|
-
* property that is not listed on the type `T` has been found.
|
|
231
|
-
* following the type `T` without any superfluous
|
|
232
|
-
* be returned.
|
|
232
|
+
* Asserts a parametric value type and throws a {@link TypeGuardError} with
|
|
233
|
+
* detailed reason, if the parametric value is not following the type `T` or
|
|
234
|
+
* some superfluous property that is not listed on the type `T` has been found.
|
|
235
|
+
* Otherwise, the value is following the type `T` without any superfluous
|
|
236
|
+
* property, just input parameter would be returned.
|
|
233
237
|
*
|
|
234
|
-
* If what you want is not asserting but just knowing whether the parametric
|
|
235
|
-
* following the type `T` or not, you can choose the {@link equals}
|
|
236
|
-
* Otherwise, if you want to know all the errors,
|
|
238
|
+
* If what you want is not asserting but just knowing whether the parametric
|
|
239
|
+
* value is following the type `T` or not, you can choose the {@link equals}
|
|
240
|
+
* function instead. Otherwise, if you want to know all the errors,
|
|
241
|
+
* {@link validateEquals} is the way to go.
|
|
237
242
|
*
|
|
238
|
-
* On the other hand, if you want to allow superfluous property that is not
|
|
239
|
-
* to the type `T`, you can use {@link assert} function instead.
|
|
243
|
+
* On the other hand, if you want to allow superfluous property that is not
|
|
244
|
+
* enrolled to the type `T`, you can use {@link assert} function instead.
|
|
240
245
|
*
|
|
246
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
241
247
|
* @template T Type of the input value
|
|
242
248
|
* @param input A value to be asserted
|
|
243
249
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
244
250
|
* @returns Parametric input value
|
|
245
251
|
* @throws A {@link TypeGuardError} instance with a detailed reason
|
|
246
|
-
*
|
|
247
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
248
252
|
*/
|
|
249
253
|
export declare function assertEquals<T>(input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): T;
|
|
250
254
|
/**
|
|
251
255
|
* Asserts equality between a value and its type.
|
|
252
256
|
*
|
|
253
|
-
* Asserts a parametric value type and throws a {@link TypeGuardError} with
|
|
254
|
-
* reason, if the parametric value is not following the type `T` or
|
|
255
|
-
* property that is not listed on the type `T` has been found.
|
|
256
|
-
* following the type `T` without any superfluous
|
|
257
|
-
* be returned.
|
|
257
|
+
* Asserts a parametric value type and throws a {@link TypeGuardError} with
|
|
258
|
+
* detailed reason, if the parametric value is not following the type `T` or
|
|
259
|
+
* some superfluous property that is not listed on the type `T` has been found.
|
|
260
|
+
* Otherwise, the value is following the type `T` without any superfluous
|
|
261
|
+
* property, just input parameter would be returned.
|
|
258
262
|
*
|
|
259
|
-
* If what you want is not asserting but just knowing whether the parametric
|
|
260
|
-
* following the type `T` or not, you can choose the {@link equals}
|
|
261
|
-
* Otherwise, if you want to know all the errors,
|
|
263
|
+
* If what you want is not asserting but just knowing whether the parametric
|
|
264
|
+
* value is following the type `T` or not, you can choose the {@link equals}
|
|
265
|
+
* function instead. Otherwise, if you want to know all the errors,
|
|
266
|
+
* {@link validateEquals} is the way to go.
|
|
262
267
|
*
|
|
263
|
-
* On the other hand, if you want to allow superfluous property that is not
|
|
264
|
-
* to the type `T`, you can use {@link assert} function instead.
|
|
268
|
+
* On the other hand, if you want to allow superfluous property that is not
|
|
269
|
+
* enrolled to the type `T`, you can use {@link assert} function instead.
|
|
265
270
|
*
|
|
271
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
266
272
|
* @template T Type of the input value
|
|
267
273
|
* @param input A value to be asserted
|
|
268
274
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
269
275
|
* @returns Parametric input value casted as `T`
|
|
270
276
|
* @throws A {@link TypeGuardError} instance with a detailed reason
|
|
271
|
-
*
|
|
272
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
273
277
|
*/
|
|
274
278
|
export declare function assertEquals<T>(input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): T;
|
|
275
279
|
/**
|
|
276
280
|
* Assertion guard of a type with equality.
|
|
277
281
|
*
|
|
278
|
-
* Asserts a parametric value type and throws a {@link TypeGuardError} with
|
|
279
|
-
* reason, if the parametric value is not following the type `T` or
|
|
280
|
-
* property that is not listed on the type `T` has been found.
|
|
282
|
+
* Asserts a parametric value type and throws a {@link TypeGuardError} with
|
|
283
|
+
* detailed reason, if the parametric value is not following the type `T` or
|
|
284
|
+
* some superfluous property that is not listed on the type `T` has been found.
|
|
281
285
|
*
|
|
282
|
-
* Otherwise, the value is following the type `T` without any superfluous
|
|
283
|
-
* nothing will be returned, but the input value would be
|
|
284
|
-
* the type `T`. This is the concept of "Assertion
|
|
286
|
+
* Otherwise, the value is following the type `T` without any superfluous
|
|
287
|
+
* property, nothing will be returned, but the input value would be
|
|
288
|
+
* automatically casted to the type `T`. This is the concept of "Assertion
|
|
289
|
+
* Guard" of a value type.
|
|
285
290
|
*
|
|
286
|
-
* If what you want is not asserting but just knowing whether the parametric
|
|
287
|
-
* following the type `T` or not, you can choose the {@link equals}
|
|
288
|
-
* Otherwise, if you want to know all the errors,
|
|
289
|
-
* Also, if you want to returns the
|
|
290
|
-
* {@link assert} function
|
|
291
|
+
* If what you want is not asserting but just knowing whether the parametric
|
|
292
|
+
* value is following the type `T` or not, you can choose the {@link equals}
|
|
293
|
+
* function instead. Otherwise, if you want to know all the errors,
|
|
294
|
+
* {@link validateEquals} is the way to go. Also, if you want to returns the
|
|
295
|
+
* parametric value when no problem, you can use {@link assert} function
|
|
296
|
+
* instead.
|
|
291
297
|
*
|
|
292
|
-
* On the other hand, if you want to allow superfluous property that is not
|
|
293
|
-
* to the type `T`, you can use {@link assertEquals} function instead.
|
|
298
|
+
* On the other hand, if you want to allow superfluous property that is not
|
|
299
|
+
* enrolled to the type `T`, you can use {@link assertEquals} function instead.
|
|
294
300
|
*
|
|
301
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
295
302
|
* @template T Type of the input value
|
|
296
303
|
* @param input A value to be asserted
|
|
297
304
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
298
305
|
* @returns Parametric input value casted as `T`
|
|
299
306
|
* @throws A {@link TypeGuardError} instance with a detailed reason
|
|
300
|
-
*
|
|
301
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
302
307
|
*/
|
|
303
308
|
export declare function assertGuardEquals<T>(input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): asserts input is T;
|
|
304
309
|
/**
|
|
305
310
|
* Assertion guard of a type with equality.
|
|
306
311
|
*
|
|
307
|
-
* Asserts a parametric value type and throws a {@link TypeGuardError} with
|
|
308
|
-
* reason, if the parametric value is not following the type `T` or
|
|
309
|
-
* property that is not listed on the type `T` has been found.
|
|
312
|
+
* Asserts a parametric value type and throws a {@link TypeGuardError} with
|
|
313
|
+
* detailed reason, if the parametric value is not following the type `T` or
|
|
314
|
+
* some superfluous property that is not listed on the type `T` has been found.
|
|
310
315
|
*
|
|
311
|
-
* Otherwise, the value is following the type `T` without any superfluous
|
|
312
|
-
* nothing will be returned, but the input value would be
|
|
313
|
-
* the type `T`. This is the concept of "Assertion
|
|
316
|
+
* Otherwise, the value is following the type `T` without any superfluous
|
|
317
|
+
* property, nothing will be returned, but the input value would be
|
|
318
|
+
* automatically casted to the type `T`. This is the concept of "Assertion
|
|
319
|
+
* Guard" of a value type.
|
|
314
320
|
*
|
|
315
|
-
* If what you want is not asserting but just knowing whether the parametric
|
|
316
|
-
* following the type `T` or not, you can choose the {@link equals}
|
|
317
|
-
* Otherwise, if you want to know all the errors,
|
|
318
|
-
* Also, if you want to returns the
|
|
319
|
-
* {@link assertEquals} function
|
|
321
|
+
* If what you want is not asserting but just knowing whether the parametric
|
|
322
|
+
* value is following the type `T` or not, you can choose the {@link equals}
|
|
323
|
+
* function instead. Otherwise, if you want to know all the errors,
|
|
324
|
+
* {@link validateEquals} is the way to go. Also, if you want to returns the
|
|
325
|
+
* parametric value when no problem, you can use {@link assertEquals} function
|
|
326
|
+
* instead.
|
|
320
327
|
*
|
|
321
|
-
* On the other hand, if you want to allow superfluous property that is not
|
|
322
|
-
* to the type `T`, you can use {@link assertGuard} function instead.
|
|
328
|
+
* On the other hand, if you want to allow superfluous property that is not
|
|
329
|
+
* enrolled to the type `T`, you can use {@link assertGuard} function instead.
|
|
323
330
|
*
|
|
331
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
324
332
|
* @template T Type of the input value
|
|
325
333
|
* @param input A value to be asserted
|
|
326
334
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
327
335
|
* @returns Parametric input value casted as `T`
|
|
328
336
|
* @throws A {@link TypeGuardError} instance with a detailed reason
|
|
329
|
-
*
|
|
330
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
331
337
|
*/
|
|
332
338
|
export declare function assertGuardEquals<T>(input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): asserts input is T;
|
|
333
339
|
/**
|
|
334
340
|
* Tests equality between a value and its type.
|
|
335
341
|
*
|
|
336
|
-
* Tests a parametric value type and returns whether it's equivalent to the type
|
|
337
|
-
* or not. If the parametric value is matched with the type `T` and there's
|
|
338
|
-
* superfluous property that is not listed on the type `T`, `true` value
|
|
339
|
-
* returned. Otherwise, if the parametric value is not following the
|
|
340
|
-
* superfluous property exists, `false` value will be
|
|
342
|
+
* Tests a parametric value type and returns whether it's equivalent to the type
|
|
343
|
+
* `T` or not. If the parametric value is matched with the type `T` and there's
|
|
344
|
+
* not any superfluous property that is not listed on the type `T`, `true` value
|
|
345
|
+
* will be returned. Otherwise, if the parametric value is not following the
|
|
346
|
+
* type `T` or some superfluous property exists, `false` value will be
|
|
347
|
+
* returned.
|
|
341
348
|
*
|
|
342
|
-
* If what you want is not just knowing whether the parametric value is
|
|
343
|
-
* type `T` or not, but throwing an exception with a detailed
|
|
344
|
-
* {@link assertEquals} function instead. Also, if you
|
|
345
|
-
* detailed reasons, {@link validateEquals}
|
|
349
|
+
* If what you want is not just knowing whether the parametric value is
|
|
350
|
+
* following the type `T` or not, but throwing an exception with a detailed
|
|
351
|
+
* reason, you can choose {@link assertEquals} function instead. Also, if you
|
|
352
|
+
* want to know all the errors with detailed reasons, {@link validateEquals}
|
|
353
|
+
* function will be useful.
|
|
346
354
|
*
|
|
347
|
-
* On the other hand, if you want to allow superfluous property that is not
|
|
348
|
-
* to the type `T`, you can use {@link is} function instead.
|
|
355
|
+
* On the other hand, if you want to allow superfluous property that is not
|
|
356
|
+
* enrolled to the type `T`, you can use {@link is} function instead.
|
|
349
357
|
*
|
|
358
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
350
359
|
* @template T Type of the input value
|
|
351
360
|
* @param input A value to be tested
|
|
352
361
|
* @returns Whether the parametric value is equivalent to the type `T` or not
|
|
353
|
-
*
|
|
354
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
355
362
|
*/
|
|
356
363
|
export declare function equals<T>(input: T): input is T;
|
|
357
364
|
/**
|
|
358
365
|
* Tests equality between a value and its type.
|
|
359
366
|
*
|
|
360
|
-
* Tests a parametric value type and returns whether it's equivalent to the type
|
|
361
|
-
* or not. If the parametric value is matched with the type `T` and there's
|
|
362
|
-
* superfluous property that is not listed on the type `T`, `true` value
|
|
363
|
-
* returned. Otherwise, if the parametric value is not following the
|
|
364
|
-
* superfluous property exists, `false` value will be
|
|
367
|
+
* Tests a parametric value type and returns whether it's equivalent to the type
|
|
368
|
+
* `T` or not. If the parametric value is matched with the type `T` and there's
|
|
369
|
+
* not any superfluous property that is not listed on the type `T`, `true` value
|
|
370
|
+
* will be returned. Otherwise, if the parametric value is not following the
|
|
371
|
+
* type `T` or some superfluous property exists, `false` value will be
|
|
372
|
+
* returned.
|
|
365
373
|
*
|
|
366
|
-
* If what you want is not just knowing whether the parametric value is
|
|
367
|
-
* type `T` or not, but throwing an exception with a detailed
|
|
368
|
-
* {@link assertEquals} function instead. Also, if you
|
|
369
|
-
* detailed reasons, {@link validateEquals}
|
|
374
|
+
* If what you want is not just knowing whether the parametric value is
|
|
375
|
+
* following the type `T` or not, but throwing an exception with a detailed
|
|
376
|
+
* reason, you can choose {@link assertEquals} function instead. Also, if you
|
|
377
|
+
* want to know all the errors with detailed reasons, {@link validateEquals}
|
|
378
|
+
* function will be useful.
|
|
370
379
|
*
|
|
371
|
-
* On the other hand, if you want to allow superfluous property that is not
|
|
372
|
-
* to the type `T`, you can use {@link is} function instead.
|
|
380
|
+
* On the other hand, if you want to allow superfluous property that is not
|
|
381
|
+
* enrolled to the type `T`, you can use {@link is} function instead.
|
|
373
382
|
*
|
|
383
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
374
384
|
* @template T Type of the input value
|
|
375
385
|
* @param input A value to be tested
|
|
376
386
|
* @returns Whether the parametric value is equivalent to the type `T` or not
|
|
377
|
-
*
|
|
378
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
379
387
|
*/
|
|
380
388
|
export declare function equals<T>(input: unknown): input is T;
|
|
381
389
|
/**
|
|
@@ -383,24 +391,24 @@ export declare function equals<T>(input: unknown): input is T;
|
|
|
383
391
|
*
|
|
384
392
|
* Validates a parametric value type and archives all the type errors into an
|
|
385
393
|
* {@link IValidation.errors} array, if the parametric value is not following the
|
|
386
|
-
* type `T` or some superfluous property that is not listed on the type `T` has
|
|
387
|
-
* found. Of course, if the parametric value is following the type `T` and
|
|
388
|
-
* superfluous property exists, the {@link IValidation.errors} array would be
|
|
389
|
-
* and {@link IValidation.success} would have the `true` value.
|
|
394
|
+
* type `T` or some superfluous property that is not listed on the type `T` has
|
|
395
|
+
* been found. Of course, if the parametric value is following the type `T` and
|
|
396
|
+
* no superfluous property exists, the {@link IValidation.errors} array would be
|
|
397
|
+
* empty and {@link IValidation.success} would have the `true` value.
|
|
390
398
|
*
|
|
391
|
-
* If what you want is not finding all the error, but asserting the parametric
|
|
392
|
-
* type with exception throwing, you can choose {@link assert} function
|
|
393
|
-
* Otherwise, you just want to know whether the parametric value is
|
|
394
|
-
* type `T`, {@link is} function is the way to go.
|
|
399
|
+
* If what you want is not finding all the error, but asserting the parametric
|
|
400
|
+
* value type with exception throwing, you can choose {@link assert} function
|
|
401
|
+
* instead. Otherwise, you just want to know whether the parametric value is
|
|
402
|
+
* matched with the type `T`, {@link is} function is the way to go.
|
|
395
403
|
*
|
|
396
|
-
* On the other hand, if you don't want to allow any superfluous property that
|
|
397
|
-
* enrolled to the type `T`, you can use {@link validateEquals} function
|
|
404
|
+
* On the other hand, if you don't want to allow any superfluous property that
|
|
405
|
+
* is not enrolled to the type `T`, you can use {@link validateEquals} function
|
|
406
|
+
* instead.
|
|
398
407
|
*
|
|
399
|
-
* @
|
|
408
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
409
|
+
* @template Type Of the input value
|
|
400
410
|
* @param input A value to be validated
|
|
401
411
|
* @returns Validation result
|
|
402
|
-
*
|
|
403
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
404
412
|
*/
|
|
405
413
|
export declare function validateEquals<T>(input: T): IValidation<T>;
|
|
406
414
|
/**
|
|
@@ -408,24 +416,24 @@ export declare function validateEquals<T>(input: T): IValidation<T>;
|
|
|
408
416
|
*
|
|
409
417
|
* Validates a parametric value type and archives all the type errors into an
|
|
410
418
|
* {@link IValidation.errors} array, if the parametric value is not following the
|
|
411
|
-
* type `T` or some superfluous property that is not listed on the type `T` has
|
|
412
|
-
* found. Of course, if the parametric value is following the type `T` and
|
|
413
|
-
* superfluous property exists, the {@link IValidation.errors} array would be
|
|
414
|
-
* and {@link IValidation.success} would have the `true` value.
|
|
419
|
+
* type `T` or some superfluous property that is not listed on the type `T` has
|
|
420
|
+
* been found. Of course, if the parametric value is following the type `T` and
|
|
421
|
+
* no superfluous property exists, the {@link IValidation.errors} array would be
|
|
422
|
+
* empty and {@link IValidation.success} would have the `true` value.
|
|
415
423
|
*
|
|
416
|
-
* If what you want is not finding all the error, but asserting the parametric
|
|
417
|
-
* type with exception throwing, you can choose {@link assert} function
|
|
418
|
-
* Otherwise, you just want to know whether the parametric value is
|
|
419
|
-
* type `T`, {@link is} function is the way to go.
|
|
424
|
+
* If what you want is not finding all the error, but asserting the parametric
|
|
425
|
+
* value type with exception throwing, you can choose {@link assert} function
|
|
426
|
+
* instead. Otherwise, you just want to know whether the parametric value is
|
|
427
|
+
* matched with the type `T`, {@link is} function is the way to go.
|
|
420
428
|
*
|
|
421
|
-
* On the other hand, if you don't want to allow any superfluous property that
|
|
422
|
-
* enrolled to the type `T`, you can use {@link validateEquals} function
|
|
429
|
+
* On the other hand, if you don't want to allow any superfluous property that
|
|
430
|
+
* is not enrolled to the type `T`, you can use {@link validateEquals} function
|
|
431
|
+
* instead.
|
|
423
432
|
*
|
|
424
|
-
* @
|
|
433
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
434
|
+
* @template Type Of the input value
|
|
425
435
|
* @param input A value to be validated
|
|
426
436
|
* @returns Validation result
|
|
427
|
-
*
|
|
428
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
429
437
|
*/
|
|
430
438
|
export declare function validateEquals<T>(input: unknown): IValidation<T>;
|
|
431
439
|
/**
|
|
@@ -440,11 +448,10 @@ export declare function validateEquals<T>(input: unknown): IValidation<T>;
|
|
|
440
448
|
* be ignored. Also, when the type `T` has a `toJSON()` method, its return type
|
|
441
449
|
* will be generated instead.
|
|
442
450
|
*
|
|
451
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
443
452
|
* @template T Type of data to generate
|
|
444
453
|
* @param generator Random data generator
|
|
445
|
-
* @
|
|
446
|
-
*
|
|
447
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
454
|
+
* @returns Randomly generated data
|
|
448
455
|
*/
|
|
449
456
|
export declare function random(generator?: Partial<IRandomGenerator>): never;
|
|
450
457
|
/**
|
|
@@ -457,40 +464,37 @@ export declare function random(generator?: Partial<IRandomGenerator>): never;
|
|
|
457
464
|
* be ignored. Also, when the type `T` has a `toJSON()` method, its return type
|
|
458
465
|
* will be generated instead.
|
|
459
466
|
*
|
|
467
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
460
468
|
* @template T Type of data to generate
|
|
461
469
|
* @param generator Random data generator
|
|
462
|
-
* @
|
|
463
|
-
*
|
|
464
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
470
|
+
* @returns Randomly generated data
|
|
465
471
|
*/
|
|
466
472
|
export declare function random<T>(generator?: Partial<IRandomGenerator>): Resolved<T>;
|
|
467
473
|
/**
|
|
468
474
|
* Creates a reusable {@link assert} function.
|
|
469
475
|
*
|
|
470
|
-
* @
|
|
476
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
471
477
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
472
478
|
* @returns Nothing until you configure the generic argument `T`
|
|
473
|
-
* @throws
|
|
474
|
-
*
|
|
475
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
479
|
+
* @throws Compile error
|
|
480
|
+
* @danger You must configure the generic argument `T`
|
|
476
481
|
*/
|
|
477
482
|
export declare function createAssert(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
478
483
|
/**
|
|
479
484
|
* Creates a reusable {@link assert} function.
|
|
480
485
|
*
|
|
486
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
481
487
|
* @template T Type of the input value
|
|
482
488
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
483
489
|
* @returns A reusable `assert` function
|
|
484
|
-
*
|
|
485
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
486
490
|
*/
|
|
487
491
|
export declare function createAssert<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown) => T;
|
|
488
492
|
/**
|
|
489
493
|
* Creates a reusable {@link assertGuard} function.
|
|
490
494
|
*
|
|
491
495
|
* Note that, you've to declare the variable type of the factory function caller
|
|
492
|
-
* like below. If you don't declare the variable type, compilation error be
|
|
493
|
-
* This is the special rule of the TypeScript compiler.
|
|
496
|
+
* like below. If you don't declare the variable type, compilation error be
|
|
497
|
+
* thrown. This is the special rule of the TypeScript compiler.
|
|
494
498
|
*
|
|
495
499
|
* ```typescript
|
|
496
500
|
* // MUST DECLARE THE VARIABLE TYPE
|
|
@@ -500,23 +504,22 @@ export declare function createAssert<T>(errorFactory?: undefined | ((props: Type
|
|
|
500
504
|
* const func = typia.createAssertGuard<number>();
|
|
501
505
|
* ```
|
|
502
506
|
*
|
|
503
|
-
* >
|
|
504
|
-
* >
|
|
507
|
+
* > _Assertions require every name in the call target to be declared with an_
|
|
508
|
+
* > _explicit type annotation._
|
|
505
509
|
*
|
|
506
|
-
* @
|
|
510
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
507
511
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
508
512
|
* @returns Nothing until you configure the generic argument `T`
|
|
509
|
-
* @throws
|
|
510
|
-
*
|
|
511
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
513
|
+
* @throws Compile error
|
|
514
|
+
* @danger You must configure the generic argument `T`
|
|
512
515
|
*/
|
|
513
516
|
export declare function createAssertGuard(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
514
517
|
/**
|
|
515
518
|
* Creates a reusable {@link assertGuard} function.
|
|
516
519
|
*
|
|
517
520
|
* Note that, you've to declare the variable type of the factory function caller
|
|
518
|
-
* like below. If you don't declare the variable type, compilation error be
|
|
519
|
-
* This is the special rule of the TypeScript compiler.
|
|
521
|
+
* like below. If you don't declare the variable type, compilation error be
|
|
522
|
+
* thrown. This is the special rule of the TypeScript compiler.
|
|
520
523
|
*
|
|
521
524
|
* ```typescript
|
|
522
525
|
* // MUST DECLARE THE VARIABLE TYPE
|
|
@@ -526,81 +529,74 @@ export declare function createAssertGuard(errorFactory?: undefined | ((props: Ty
|
|
|
526
529
|
* const func = typia.createAssertGuard<number>();
|
|
527
530
|
* ```
|
|
528
531
|
*
|
|
529
|
-
* >
|
|
530
|
-
* >
|
|
531
|
-
*
|
|
532
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
533
|
-
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
534
|
-
* @throws compile error
|
|
532
|
+
* > _Assertions require every name in the call target to be declared with an_
|
|
533
|
+
* > _explicit type annotation._
|
|
535
534
|
*
|
|
536
535
|
* @author Jeongho Nam - https://github.com/samchon
|
|
536
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
537
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
538
|
+
* @throws Compile error
|
|
537
539
|
*/
|
|
538
540
|
export declare function createAssertGuard<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown) => AssertionGuard<T>;
|
|
539
541
|
/**
|
|
540
542
|
* Creates a reusable {@link is} function.
|
|
541
543
|
*
|
|
542
|
-
* @danger You must configure the generic argument `T`
|
|
543
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
544
|
-
* @throws compile error
|
|
545
|
-
*
|
|
546
544
|
* @author Jeongho Nam - https://github.com/samchon
|
|
545
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
546
|
+
* @throws Compile error
|
|
547
|
+
* @danger You must configure the generic argument `T`
|
|
547
548
|
*/
|
|
548
549
|
export declare function createIs(): never;
|
|
549
550
|
/**
|
|
550
551
|
* Creates a reusable {@link is} function.
|
|
551
552
|
*
|
|
553
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
552
554
|
* @template T Type of the input value
|
|
553
555
|
* @returns A reusable `is` function
|
|
554
|
-
*
|
|
555
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
556
556
|
*/
|
|
557
557
|
export declare function createIs<T>(): (input: unknown) => input is T;
|
|
558
558
|
/**
|
|
559
559
|
* Creates a reusable {@link validate} function.
|
|
560
560
|
*
|
|
561
|
-
* @danger You must configure the generic argument `T`
|
|
562
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
563
|
-
* @throws compile error
|
|
564
|
-
*
|
|
565
561
|
* @author Jeongho Nam - https://github.com/samchon
|
|
562
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
563
|
+
* @throws Compile error
|
|
564
|
+
* @danger You must configure the generic argument `T`
|
|
566
565
|
*/
|
|
567
566
|
export declare function createValidate(): never;
|
|
568
567
|
/**
|
|
569
568
|
* Creates a reusable {@link validate} function.
|
|
570
569
|
*
|
|
570
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
571
571
|
* @template T Type of the input value
|
|
572
572
|
* @returns A reusable `validate` function
|
|
573
|
-
*
|
|
574
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
575
573
|
*/
|
|
576
574
|
export declare function createValidate<T>(): ((input: unknown) => IValidation<T>) & StandardSchemaV1<unknown, T>;
|
|
577
575
|
/**
|
|
578
576
|
* Creates a reusable {@link assertEquals} function.
|
|
579
577
|
*
|
|
580
|
-
* @
|
|
578
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
581
579
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
582
580
|
* @returns Nothing until you configure the generic argument `T`
|
|
583
|
-
* @throws
|
|
584
|
-
*
|
|
585
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
581
|
+
* @throws Compile error
|
|
582
|
+
* @danger You must configure the generic argument `T`
|
|
586
583
|
*/
|
|
587
584
|
export declare function createAssertEquals(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
588
585
|
/**
|
|
589
586
|
* Creates a reusable {@link assertEquals} function.
|
|
590
587
|
*
|
|
588
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
591
589
|
* @template T Type of the input value
|
|
592
590
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
593
591
|
* @returns A reusable `assertEquals` function
|
|
594
|
-
*
|
|
595
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
596
592
|
*/
|
|
597
593
|
export declare function createAssertEquals<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown) => T;
|
|
598
594
|
/**
|
|
599
595
|
* Creates a reusable {@link assertGuardEquals} function.
|
|
600
596
|
*
|
|
601
597
|
* Note that, you've to declare the variable type of the factory function caller
|
|
602
|
-
* like below. If you don't declare the variable type, compilation error be
|
|
603
|
-
* This is the special rule of the TypeScript compiler.
|
|
598
|
+
* like below. If you don't declare the variable type, compilation error be
|
|
599
|
+
* thrown. This is the special rule of the TypeScript compiler.
|
|
604
600
|
*
|
|
605
601
|
* ```typescript
|
|
606
602
|
* // MUST DECLARE THE VARIABLE TYPE
|
|
@@ -610,23 +606,22 @@ export declare function createAssertEquals<T>(errorFactory?: undefined | ((props
|
|
|
610
606
|
* const func = typia.createAssertGuardEquals<number>();
|
|
611
607
|
* ```
|
|
612
608
|
*
|
|
613
|
-
* >
|
|
614
|
-
* >
|
|
609
|
+
* > _Assertions require every name in the call target to be declared with an_
|
|
610
|
+
* > _explicit type annotation._
|
|
615
611
|
*
|
|
616
|
-
* @
|
|
612
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
617
613
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
618
614
|
* @returns Nothing until you configure the generic argument `T`
|
|
619
|
-
* @throws
|
|
620
|
-
*
|
|
621
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
615
|
+
* @throws Compile error
|
|
616
|
+
* @danger You must configure the generic argument `T`
|
|
622
617
|
*/
|
|
623
618
|
export declare function createAssertGuardEquals(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
624
619
|
/**
|
|
625
620
|
* Creates a reusable {@link assertGuardEquals} function.
|
|
626
621
|
*
|
|
627
622
|
* Note that, you've to declare the variable type of the factory function caller
|
|
628
|
-
* like below. If you don't declare the variable type, compilation error be
|
|
629
|
-
* This is the special rule of the TypeScript compiler.
|
|
623
|
+
* like below. If you don't declare the variable type, compilation error be
|
|
624
|
+
* thrown. This is the special rule of the TypeScript compiler.
|
|
630
625
|
*
|
|
631
626
|
* ```typescript
|
|
632
627
|
* // MUST DECLARE THE VARIABLE TYPE
|
|
@@ -636,72 +631,65 @@ export declare function createAssertGuardEquals(errorFactory?: undefined | ((pro
|
|
|
636
631
|
* const func = typia.createAssertGuardEquals<number>();
|
|
637
632
|
* ```
|
|
638
633
|
*
|
|
639
|
-
* >
|
|
640
|
-
* >
|
|
634
|
+
* > _Assertions require every name in the call target to be declared with an_
|
|
635
|
+
* > _explicit type annotation._
|
|
641
636
|
*
|
|
637
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
642
638
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
643
639
|
* @returns Nothing until you configure the generic argument `T`
|
|
644
|
-
* @throws
|
|
645
|
-
*
|
|
646
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
640
|
+
* @throws Compile error
|
|
647
641
|
*/
|
|
648
642
|
export declare function createAssertGuardEquals<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown) => AssertionGuard<T>;
|
|
649
643
|
/**
|
|
650
644
|
* Creates a reusable {@link equals} function.
|
|
651
645
|
*
|
|
652
|
-
* @danger You must configure the generic argument `T`
|
|
653
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
654
|
-
* @throws compile error
|
|
655
|
-
*
|
|
656
646
|
* @author Jeongho Nam - https://github.com/samchon
|
|
647
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
648
|
+
* @throws Compile error
|
|
649
|
+
* @danger You must configure the generic argument `T`
|
|
657
650
|
*/
|
|
658
651
|
export declare function createEquals(): never;
|
|
659
652
|
/**
|
|
660
653
|
* Creates a reusable {@link equals} function.
|
|
661
654
|
*
|
|
655
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
662
656
|
* @template T Type of the input value
|
|
663
657
|
* @returns A reusable `equals` function
|
|
664
|
-
*
|
|
665
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
666
658
|
*/
|
|
667
659
|
export declare function createEquals<T>(): (input: unknown) => input is T;
|
|
668
660
|
/**
|
|
669
661
|
* Creates a reusable {@link validateEquals} function.
|
|
670
662
|
*
|
|
671
|
-
* @danger You must configure the generic argument `T`
|
|
672
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
673
|
-
* @throws compile error
|
|
674
|
-
*
|
|
675
663
|
* @author Jeongho Nam - https://github.com/samchon
|
|
664
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
665
|
+
* @throws Compile error
|
|
666
|
+
* @danger You must configure the generic argument `T`
|
|
676
667
|
*/
|
|
677
668
|
export declare function createValidateEquals(): never;
|
|
678
669
|
/**
|
|
679
670
|
* Creates a reusable {@link validateEquals} function.
|
|
680
671
|
*
|
|
672
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
681
673
|
* @template T Type of the input value
|
|
682
674
|
* @returns A reusable `validateEquals` function
|
|
683
|
-
*
|
|
684
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
685
675
|
*/
|
|
686
676
|
export declare function createValidateEquals<T>(): ((input: unknown) => IValidation<T>) & StandardSchemaV1<unknown, T>;
|
|
687
677
|
/**
|
|
688
678
|
* Creates a reusable {@link random} function.
|
|
689
679
|
*
|
|
690
|
-
* @
|
|
680
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
691
681
|
* @param generator Random data generator
|
|
692
682
|
* @returns Nothing until you configure the generic argument `T`
|
|
693
|
-
* @throws
|
|
694
|
-
*
|
|
695
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
683
|
+
* @throws Compile error
|
|
684
|
+
* @danger You must configure the generic argument `T`
|
|
696
685
|
*/
|
|
697
686
|
export declare function createRandom(generator?: Partial<IRandomGenerator>): never;
|
|
698
687
|
/**
|
|
699
688
|
* Creates a reusable {@link random} function.
|
|
700
689
|
*
|
|
690
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
701
691
|
* @template T Type of the input value
|
|
702
692
|
* @param generator Random data generator
|
|
703
693
|
* @returns A reusable `random` function
|
|
704
|
-
*
|
|
705
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
706
694
|
*/
|
|
707
695
|
export declare function createRandom<T>(generator?: Partial<IRandomGenerator>): () => Resolved<T>;
|