typia 9.7.1 → 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/programmers/json/JsonStringifyProgrammer.js +2 -2
- package/lib/programmers/json/JsonStringifyProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonStringifyProgrammer.mjs +2 -2
- 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 +16 -16
- package/lib/tags/Constant.d.ts +16 -16
- package/lib/tags/ContentMediaType.d.mts +7 -7
- package/lib/tags/ContentMediaType.d.ts +7 -7
- package/lib/tags/Default.d.mts +19 -19
- package/lib/tags/Default.d.ts +19 -19
- package/lib/tags/Example.d.mts +18 -18
- package/lib/tags/Example.d.ts +18 -18
- package/lib/tags/Examples.d.mts +23 -23
- package/lib/tags/Examples.d.ts +23 -23
- package/lib/tags/ExclusiveMaximum.d.mts +8 -5
- package/lib/tags/ExclusiveMaximum.d.ts +8 -5
- package/lib/tags/ExclusiveMinimum.d.mts +8 -5
- package/lib/tags/ExclusiveMinimum.d.ts +8 -5
- package/lib/tags/Format.d.mts +12 -8
- package/lib/tags/Format.d.ts +12 -8
- package/lib/tags/JsonSchemaPlugin.d.mts +20 -18
- package/lib/tags/JsonSchemaPlugin.d.ts +20 -18
- package/lib/tags/MaxItems.d.mts +9 -9
- package/lib/tags/MaxItems.d.ts +9 -9
- package/lib/tags/MaxLength.d.mts +6 -5
- package/lib/tags/MaxLength.d.ts +6 -5
- package/lib/tags/Maximum.d.mts +9 -7
- package/lib/tags/Maximum.d.ts +9 -7
- package/lib/tags/MinItems.d.mts +9 -9
- package/lib/tags/MinItems.d.ts +9 -9
- package/lib/tags/MinLength.d.mts +6 -5
- package/lib/tags/MinLength.d.ts +6 -5
- package/lib/tags/Minimum.d.mts +9 -7
- package/lib/tags/Minimum.d.ts +9 -7
- package/lib/tags/MultipleOf.d.mts +10 -7
- package/lib/tags/MultipleOf.d.ts +10 -7
- package/lib/tags/Pattern.d.mts +7 -4
- package/lib/tags/Pattern.d.ts +7 -4
- package/lib/tags/Sequence.d.mts +19 -17
- package/lib/tags/Sequence.d.ts +19 -17
- package/lib/tags/TagBase.d.mts +21 -28
- package/lib/tags/TagBase.d.ts +21 -28
- package/lib/tags/Type.d.mts +12 -11
- package/lib/tags/Type.d.ts +12 -11
- package/lib/tags/UniqueItems.d.mts +10 -9
- package/lib/tags/UniqueItems.d.ts +10 -9
- 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 +5 -10
- package/lib/transformers/ImportTransformer.js.map +1 -1
- package/lib/transformers/ImportTransformer.mjs +5 -10
- 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 +44 -42
- 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/programmers/json/JsonStringifyProgrammer.ts +2 -2
- 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 +16 -16
- package/src/tags/ContentMediaType.ts +7 -7
- package/src/tags/Default.ts +19 -19
- package/src/tags/Example.ts +18 -18
- package/src/tags/Examples.ts +23 -23
- package/src/tags/ExclusiveMaximum.ts +8 -5
- package/src/tags/ExclusiveMinimum.ts +8 -5
- package/src/tags/Format.ts +12 -8
- package/src/tags/JsonSchemaPlugin.ts +20 -18
- package/src/tags/MaxItems.ts +9 -9
- package/src/tags/MaxLength.ts +6 -5
- package/src/tags/Maximum.ts +9 -7
- package/src/tags/MinItems.ts +9 -9
- package/src/tags/MinLength.ts +6 -5
- package/src/tags/Minimum.ts +9 -7
- package/src/tags/MultipleOf.ts +10 -7
- package/src/tags/Pattern.ts +7 -4
- package/src/tags/Sequence.ts +19 -17
- package/src/tags/TagBase.ts +21 -28
- package/src/tags/Type.ts +12 -11
- package/src/tags/UniqueItems.ts +10 -9
- package/src/tags/internal/FormatCheatSheet.ts +1 -3
- package/src/transformers/ITransformOptions.ts +27 -19
- package/src/transformers/ImportTransformer.ts +5 -10
- package/src/transformers/NoTransformConfigurationError.ts +1 -3
- package/src/transformers/features/llm/LlmApplicationTransformer.ts +1 -3
- package/src/typings/Equal.ts +6 -6
package/src/json.ts
CHANGED
|
@@ -21,47 +21,45 @@ import { TypeGuardError } from "./TypeGuardError";
|
|
|
21
21
|
*
|
|
22
22
|
* JSON Schemas Generator.
|
|
23
23
|
*
|
|
24
|
-
* Creates a JSON schema list which contains both main JSON schemas
|
|
25
|
-
*
|
|
24
|
+
* Creates a JSON schema list which contains both main JSON schemas and
|
|
25
|
+
* components. Note that, all of the named types are stored in the
|
|
26
26
|
* {@link IJsonSchemaCollection.components} property for the `$ref` referencing.
|
|
27
27
|
*
|
|
28
28
|
* Also, you can specify the OpenAPI version by configuring the second generic
|
|
29
|
-
* argument `Version`. For reference, the default version is `"3.1"`, and the
|
|
30
|
-
* difference between `"3.0"` and `"3.1"` is whether supporting the tuple
|
|
29
|
+
* argument `Version`. For reference, the default version is `"3.1"`, and the
|
|
30
|
+
* key difference between `"3.0"` and `"3.1"` is whether supporting the tuple
|
|
31
|
+
* type or not.
|
|
31
32
|
*
|
|
33
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
32
34
|
* @template Types Tuple of target types
|
|
33
35
|
* @template Version Version of OpenAPI specification. Default is 3.1
|
|
34
|
-
* @
|
|
35
|
-
*
|
|
36
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
36
|
+
* @returns JSON schema collection
|
|
37
37
|
*/
|
|
38
38
|
export function schemas(): never;
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* JSON Schemas Generator.
|
|
42
42
|
*
|
|
43
|
-
* Creates a JSON schema list which contains both main JSON schemas
|
|
44
|
-
*
|
|
43
|
+
* Creates a JSON schema list which contains both main JSON schemas and
|
|
44
|
+
* components. Note that, all of the named types are stored in the
|
|
45
45
|
* {@link IJsonSchemaCollection.components} property for the `$ref` referencing.
|
|
46
46
|
*
|
|
47
47
|
* Also, you can specify the OpenAPI version by configuring the second generic
|
|
48
|
-
* argument `Version`. For reference, the default version is `"3.1"`, and the
|
|
49
|
-
* difference between `"3.0"` and `"3.1"` is whether supporting the tuple
|
|
48
|
+
* argument `Version`. For reference, the default version is `"3.1"`, and the
|
|
49
|
+
* key difference between `"3.0"` and `"3.1"` is whether supporting the tuple
|
|
50
|
+
* type or not.
|
|
50
51
|
*
|
|
52
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
51
53
|
* @template Types Tuple of target types
|
|
52
54
|
* @template Version Version of OpenAPI specification. Default is 3.1
|
|
53
|
-
* @
|
|
54
|
-
*
|
|
55
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
55
|
+
* @returns JSON schema collection
|
|
56
56
|
*/
|
|
57
57
|
export function schemas<
|
|
58
58
|
Types extends unknown[],
|
|
59
59
|
Version extends "3.0" | "3.1" = "3.1",
|
|
60
60
|
>(): IJsonSchemaCollection<Version, Types>;
|
|
61
61
|
|
|
62
|
-
/**
|
|
63
|
-
* @internal
|
|
64
|
-
*/
|
|
62
|
+
/** @internal */
|
|
65
63
|
export function schemas(): never {
|
|
66
64
|
NoTransformConfigurationError("json.schemas");
|
|
67
65
|
}
|
|
@@ -71,49 +69,45 @@ export function schemas(): never {
|
|
|
71
69
|
*
|
|
72
70
|
* JSON schema generator.
|
|
73
71
|
*
|
|
74
|
-
* Creates a JSON schema unit which contains a main JSON schema and
|
|
75
|
-
*
|
|
72
|
+
* Creates a JSON schema unit which contains a main JSON schema and its
|
|
73
|
+
* components. Note that, all of the named types are stored in the
|
|
76
74
|
* {@link IJsonSchemaUnit.components} property for the `$ref` referencing.
|
|
77
75
|
*
|
|
78
|
-
* Also, you can specify the OpenAPI version by configuring the second
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
76
|
+
* Also, you can specify the OpenAPI version by configuring the second generic
|
|
77
|
+
* argument `Version`. For reference, the default version is `"3.1"`, and key
|
|
78
|
+
* different of `"3.0"` and `"3.1"` is whether supporting the tuple type or
|
|
79
|
+
* not.
|
|
82
80
|
*
|
|
81
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
83
82
|
* @template Type Target type
|
|
84
83
|
* @template Version Version of OpenAPI specification. Default is 3.1
|
|
85
|
-
* @
|
|
86
|
-
*
|
|
87
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
84
|
+
* @returns JSON schema unit
|
|
88
85
|
*/
|
|
89
86
|
export function schema(): never;
|
|
90
87
|
|
|
91
88
|
/**
|
|
92
89
|
* JSON schema generator.
|
|
93
90
|
*
|
|
94
|
-
* Creates a JSON schema unit which contains a main JSON schema and
|
|
95
|
-
*
|
|
91
|
+
* Creates a JSON schema unit which contains a main JSON schema and its
|
|
92
|
+
* components. Note that, all of the named types are stored in the
|
|
96
93
|
* {@link IJsonSchemaUnit.components} property for the `$ref` referencing.
|
|
97
94
|
*
|
|
98
|
-
* Also, you can specify the OpenAPI version by configuring the second
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
95
|
+
* Also, you can specify the OpenAPI version by configuring the second generic
|
|
96
|
+
* argument `Version`. For reference, the default version is `"3.1"`, and key
|
|
97
|
+
* different of `"3.0"` and `"3.1"` is whether supporting the tuple type or
|
|
98
|
+
* not.
|
|
102
99
|
*
|
|
100
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
103
101
|
* @template Type Target type
|
|
104
102
|
* @template Version Version of OpenAPI specification. Default is 3.1
|
|
105
|
-
* @
|
|
106
|
-
*
|
|
107
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
103
|
+
* @returns JSON schema unit
|
|
108
104
|
*/
|
|
109
105
|
export function schema<
|
|
110
106
|
Type extends unknown,
|
|
111
107
|
Version extends "3.0" | "3.1" = "3.1",
|
|
112
108
|
>(): IJsonSchemaUnit<Version, Type>;
|
|
113
109
|
|
|
114
|
-
/**
|
|
115
|
-
* @internal
|
|
116
|
-
*/
|
|
110
|
+
/** @internal */
|
|
117
111
|
export function schema(): never {
|
|
118
112
|
NoTransformConfigurationError("json.schema");
|
|
119
113
|
}
|
|
@@ -127,19 +121,19 @@ export function schema(): never {
|
|
|
127
121
|
* Safe `JSON.parse()` function with type assertion.
|
|
128
122
|
*
|
|
129
123
|
* `typia.json.assertParse()` is a combination function of `JSON.parse()` and
|
|
130
|
-
* {@link assert}. Therefore, it converts a JSON (JavaScript Object Notation)
|
|
131
|
-
* to a `T` typed instance with type assertion.
|
|
124
|
+
* {@link assert}. Therefore, it converts a JSON (JavaScript Object Notation)
|
|
125
|
+
* string to a `T` typed instance with type assertion.
|
|
132
126
|
*
|
|
133
|
-
* In such reason, when parsed JSON string value is not matched with the type
|
|
134
|
-
* throws {@link TypeGuardError} or custom error generated by
|
|
135
|
-
* if there's no problem with the parsed value, the
|
|
127
|
+
* In such reason, when parsed JSON string value is not matched with the type
|
|
128
|
+
* `T`, it throws {@link TypeGuardError} or custom error generated by
|
|
129
|
+
* _errorFactory_. Otherwise, if there's no problem with the parsed value, the
|
|
130
|
+
* parsed value will be returned.
|
|
136
131
|
*
|
|
132
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
137
133
|
* @template T Expected type of parsed value
|
|
138
134
|
* @param input JSON string
|
|
139
135
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
140
136
|
* @returns Parsed value
|
|
141
|
-
*
|
|
142
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
143
137
|
*/
|
|
144
138
|
export function assertParse(
|
|
145
139
|
input: string,
|
|
@@ -150,29 +144,26 @@ export function assertParse(
|
|
|
150
144
|
* Safe `JSON.parse()` function with type assertion.
|
|
151
145
|
*
|
|
152
146
|
* `typia.json.assertParse()` is a combination function of `JSON.parse()` and
|
|
153
|
-
* {@link assert}. Therefore, it converts a JSON (JavaScript Object Notation)
|
|
154
|
-
* to a `T` typed instance with type assertion.
|
|
147
|
+
* {@link assert}. Therefore, it converts a JSON (JavaScript Object Notation)
|
|
148
|
+
* string to a `T` typed instance with type assertion.
|
|
155
149
|
*
|
|
156
|
-
* In such reason, when parsed JSON string value is not matched with the type
|
|
157
|
-
* it throws {@link TypeGuardError} or custom error generated by
|
|
158
|
-
* Otherwise, there's no problem on the parsed value, the parsed
|
|
159
|
-
* returned.
|
|
150
|
+
* In such reason, when parsed JSON string value is not matched with the type
|
|
151
|
+
* `T`, it throws {@link TypeGuardError} or custom error generated by
|
|
152
|
+
* _errorFactory_. Otherwise, there's no problem on the parsed value, the parsed
|
|
153
|
+
* value would be returned.
|
|
160
154
|
*
|
|
155
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
161
156
|
* @template T Expected type of parsed value
|
|
162
157
|
* @param input JSON string
|
|
163
158
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
164
159
|
* @returns Parsed value
|
|
165
|
-
*
|
|
166
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
167
160
|
*/
|
|
168
161
|
export function assertParse<T>(
|
|
169
162
|
input: string,
|
|
170
163
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
171
164
|
): Primitive<T>;
|
|
172
165
|
|
|
173
|
-
/**
|
|
174
|
-
* @internal
|
|
175
|
-
*/
|
|
166
|
+
/** @internal */
|
|
176
167
|
export function assertParse<T>(): Primitive<T> {
|
|
177
168
|
NoTransformConfigurationError("json.assertParse");
|
|
178
169
|
}
|
|
@@ -182,44 +173,40 @@ export function assertParse<T>(): Primitive<T> {
|
|
|
182
173
|
*
|
|
183
174
|
* Safe `JSON.parse()` function with type checking.
|
|
184
175
|
*
|
|
185
|
-
* `typia.json.isParse()` is a combination function of `JSON.parse()` and
|
|
186
|
-
* Therefore, it converts a JSON (JavaScript Object Notation) string
|
|
187
|
-
* instance with type checking.
|
|
176
|
+
* `typia.json.isParse()` is a combination function of `JSON.parse()` and
|
|
177
|
+
* {@link is}. Therefore, it converts a JSON (JavaScript Object Notation) string
|
|
178
|
+
* to a `T` typed instance with type checking.
|
|
188
179
|
*
|
|
189
|
-
* In such reason, when parsed JSON string value is not matched with the type
|
|
190
|
-
* returns `null` value. Otherwise, there's no problem on the parsed
|
|
191
|
-
* value will be returned.
|
|
180
|
+
* In such reason, when parsed JSON string value is not matched with the type
|
|
181
|
+
* `T`, it returns `null` value. Otherwise, there's no problem on the parsed
|
|
182
|
+
* value, the parsed value will be returned.
|
|
192
183
|
*
|
|
184
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
193
185
|
* @template T Expected type of parsed value
|
|
194
186
|
* @param input JSON string
|
|
195
187
|
* @returns Parsed value when exact type, otherwise `null`
|
|
196
|
-
*
|
|
197
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
198
188
|
*/
|
|
199
189
|
export function isParse(input: string): never;
|
|
200
190
|
|
|
201
191
|
/**
|
|
202
192
|
* Safe `JSON.parse()` function with type checking.
|
|
203
193
|
*
|
|
204
|
-
* `typia.json.isParse()` is a combination function of `JSON.parse()` and
|
|
205
|
-
* Therefore, it converts a JSON (JavaScript Object Notation) string
|
|
206
|
-
* instance with type checking.
|
|
194
|
+
* `typia.json.isParse()` is a combination function of `JSON.parse()` and
|
|
195
|
+
* {@link is}. Therefore, it converts a JSON (JavaScript Object Notation) string
|
|
196
|
+
* to a `T` typed instance with type checking.
|
|
207
197
|
*
|
|
208
|
-
* In such reason, when parsed JSON string value is not matched with the type
|
|
209
|
-
* returns `null` value. Otherwise, there's no problem on the parsed
|
|
210
|
-
* value will be returned.
|
|
198
|
+
* In such reason, when parsed JSON string value is not matched with the type
|
|
199
|
+
* `T`, it returns `null` value. Otherwise, there's no problem on the parsed
|
|
200
|
+
* value, the parsed value will be returned.
|
|
211
201
|
*
|
|
202
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
212
203
|
* @template T Expected type of parsed value
|
|
213
204
|
* @param input JSON string
|
|
214
205
|
* @returns Parsed value when exact type, otherwise `null`
|
|
215
|
-
*
|
|
216
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
217
206
|
*/
|
|
218
207
|
export function isParse<T>(input: string): Primitive<T> | null;
|
|
219
208
|
|
|
220
|
-
/**
|
|
221
|
-
* @internal
|
|
222
|
-
*/
|
|
209
|
+
/** @internal */
|
|
223
210
|
export function isParse<T>(): Primitive<T> | null {
|
|
224
211
|
NoTransformConfigurationError("json.isParse");
|
|
225
212
|
}
|
|
@@ -230,19 +217,19 @@ export function isParse<T>(): Primitive<T> | null {
|
|
|
230
217
|
* Safe `JSON.parse()` function with detailed type validation.
|
|
231
218
|
*
|
|
232
219
|
* `typia.json.validateParse()` is a combination function of `JSON.parse()` and
|
|
233
|
-
* {@link validate}. Therefore, it converts a JSON (JavaScript Object Notation)
|
|
234
|
-
* to a `T` typed instance with detailed type validation.
|
|
220
|
+
* {@link validate}. Therefore, it converts a JSON (JavaScript Object Notation)
|
|
221
|
+
* string to a `T` typed instance with detailed type validation.
|
|
235
222
|
*
|
|
236
|
-
* In such reason, when parsed JSON string value is not matched with the type
|
|
237
|
-
* returns {@link IValidation.IFailure} value with detailed error
|
|
238
|
-
* there's no problem on the parsed value, the parsed value
|
|
239
|
-
* property of the output {@link IValidation.ISuccess}
|
|
223
|
+
* In such reason, when parsed JSON string value is not matched with the type
|
|
224
|
+
* `T`, it returns {@link IValidation.IFailure} value with detailed error
|
|
225
|
+
* reasons. Otherwise, there's no problem on the parsed value, the parsed value
|
|
226
|
+
* will be stored in `data` property of the output {@link IValidation.ISuccess}
|
|
227
|
+
* instance.
|
|
240
228
|
*
|
|
229
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
241
230
|
* @template T Expected type of parsed value
|
|
242
231
|
* @param input JSON string
|
|
243
232
|
* @returns Validation result with JSON parsed value
|
|
244
|
-
*
|
|
245
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
246
233
|
*/
|
|
247
234
|
export function validateParse(input: string): never;
|
|
248
235
|
|
|
@@ -250,25 +237,23 @@ export function validateParse(input: string): never;
|
|
|
250
237
|
* Safe `JSON.parse()` function with detailed type validation.
|
|
251
238
|
*
|
|
252
239
|
* `typia.json.validateParse()` is a combination function of `JSON.parse()` and
|
|
253
|
-
* {@link validate}. Therefore, it converts a JSON (JavaScript Object Notation)
|
|
254
|
-
* to a `T` typed instance with detailed type validation.
|
|
240
|
+
* {@link validate}. Therefore, it converts a JSON (JavaScript Object Notation)
|
|
241
|
+
* string to a `T` typed instance with detailed type validation.
|
|
255
242
|
*
|
|
256
|
-
* In such reason, when parsed JSON string value is not matched with the type
|
|
257
|
-
* returns {@link IValidation.IFailure} value with detailed error
|
|
258
|
-
* there's no problem on the parsed value, the parsed value
|
|
259
|
-
* property of the output {@link IValidation.ISuccess}
|
|
243
|
+
* In such reason, when parsed JSON string value is not matched with the type
|
|
244
|
+
* `T`, it returns {@link IValidation.IFailure} value with detailed error
|
|
245
|
+
* reasons. Otherwise, there's no problem on the parsed value, the parsed value
|
|
246
|
+
* will be stored in `data` property of the output {@link IValidation.ISuccess}
|
|
247
|
+
* instance.
|
|
260
248
|
*
|
|
249
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
261
250
|
* @template T Expected type of parsed value
|
|
262
251
|
* @param input JSON string
|
|
263
252
|
* @returns Validation result with JSON parsed value
|
|
264
|
-
*
|
|
265
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
266
253
|
*/
|
|
267
254
|
export function validateParse<T>(input: string): IValidation<Primitive<T>>;
|
|
268
255
|
|
|
269
|
-
/**
|
|
270
|
-
* @internal
|
|
271
|
-
*/
|
|
256
|
+
/** @internal */
|
|
272
257
|
export function validateParse<T>(): IValidation<Primitive<T>> {
|
|
273
258
|
NoTransformConfigurationError("json.validateParse");
|
|
274
259
|
}
|
|
@@ -279,30 +264,28 @@ export function validateParse<T>(): IValidation<Primitive<T>> {
|
|
|
279
264
|
/**
|
|
280
265
|
* 8x faster `JSON.stringify()` function.
|
|
281
266
|
*
|
|
282
|
-
* Converts an input value to a JSON (JavaScript Object Notation) string, about
|
|
283
|
-
* faster than the native `JSON.stringify()` function. The 5x faster
|
|
284
|
-
* because it writes an optimized JSON conversion plan, only for
|
|
267
|
+
* Converts an input value to a JSON (JavaScript Object Notation) string, about
|
|
268
|
+
* 8x faster than the native `JSON.stringify()` function. The 5x faster
|
|
269
|
+
* principle is because it writes an optimized JSON conversion plan, only for
|
|
270
|
+
* the type `T`.
|
|
285
271
|
*
|
|
286
|
-
* For reference, this `typia.json.stringify()` does not validate the input
|
|
287
|
-
* It just believes that the input value is following the type `T`.
|
|
288
|
-
* can't ensure the input value type, it will be better to
|
|
289
|
-
* functions instead.
|
|
272
|
+
* For reference, this `typia.json.stringify()` does not validate the input
|
|
273
|
+
* value type. It just believes that the input value is following the type `T`.
|
|
274
|
+
* Therefore, if you can't ensure the input value type, it will be better to
|
|
275
|
+
* call one of below functions instead.
|
|
290
276
|
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
277
|
+
* - {@link assertStringify}
|
|
278
|
+
* - {@link isStringify}
|
|
279
|
+
* - {@link validateStringify}
|
|
294
280
|
*
|
|
281
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
295
282
|
* @template T Type of the input value
|
|
296
283
|
* @param input A value to be converted
|
|
297
|
-
* @
|
|
298
|
-
*
|
|
299
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
284
|
+
* @returns JSON string value
|
|
300
285
|
*/
|
|
301
286
|
export function stringify<T>(input: T): string;
|
|
302
287
|
|
|
303
|
-
/**
|
|
304
|
-
* @internal
|
|
305
|
-
*/
|
|
288
|
+
/** @internal */
|
|
306
289
|
export function stringify(): never {
|
|
307
290
|
NoTransformConfigurationError("json.stringify");
|
|
308
291
|
}
|
|
@@ -311,23 +294,23 @@ export function stringify(): never {
|
|
|
311
294
|
* 5x faster `JSON.stringify()` function with type assertion.
|
|
312
295
|
*
|
|
313
296
|
* `typia.json.assertStringify()` is a combination function of {@link assert} and
|
|
314
|
-
* {@link stringify}. Therefore, it converts an input value to
|
|
315
|
-
*
|
|
297
|
+
* {@link stringify}. Therefore, it converts an input value to JSON (JavaScript
|
|
298
|
+
* Object Notation) string, with type assertion.
|
|
316
299
|
*
|
|
317
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
318
|
-
* {@link TypeGuardError} or custom error generated by
|
|
319
|
-
* there's no problem on the `input` value, JSON string will be
|
|
300
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
301
|
+
* throws an {@link TypeGuardError} or custom error generated by _errorFactory_.
|
|
302
|
+
* Otherwise, there's no problem on the `input` value, JSON string will be
|
|
303
|
+
* returned.
|
|
320
304
|
*
|
|
321
|
-
* For reference, with type assertion, it is even 5x times faster than the
|
|
322
|
-
* `JSON.stringify()` function. So, just enjoy the safe and fast JSON
|
|
323
|
-
* with confidence.
|
|
305
|
+
* For reference, with type assertion, it is even 5x times faster than the
|
|
306
|
+
* native `JSON.stringify()` function. So, just enjoy the safe and fast JSON
|
|
307
|
+
* conversion with confidence.
|
|
324
308
|
*
|
|
309
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
325
310
|
* @template T Type of the input value
|
|
326
311
|
* @param input A value to be asserted and converted
|
|
327
312
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
328
|
-
* @
|
|
329
|
-
*
|
|
330
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
313
|
+
* @returns JSON string value
|
|
331
314
|
*/
|
|
332
315
|
export function assertStringify<T>(
|
|
333
316
|
input: T,
|
|
@@ -338,32 +321,30 @@ export function assertStringify<T>(
|
|
|
338
321
|
* 5x faster `JSON.stringify()` function with type assertion.
|
|
339
322
|
*
|
|
340
323
|
* `typia.json.assertStringify()` is a combination function of {@link assert} and
|
|
341
|
-
* {@link stringify}. Therefore, it converts an input value to
|
|
342
|
-
*
|
|
324
|
+
* {@link stringify}. Therefore, it converts an input value to JSON (JavaScript
|
|
325
|
+
* Object Notation) string, with type assertion.
|
|
343
326
|
*
|
|
344
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
345
|
-
* {@link TypeGuardError} or custom error generated by
|
|
346
|
-
* there's no problem on the `input` value, JSON string will be
|
|
327
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
328
|
+
* throws an {@link TypeGuardError} or custom error generated by _errorFactory_.
|
|
329
|
+
* Otherwise, there's no problem on the `input` value, JSON string will be
|
|
330
|
+
* returned.
|
|
347
331
|
*
|
|
348
|
-
* For reference, with type assertion, it is even 5x times faster than the
|
|
349
|
-
* `JSON.stringify()` function. So, just enjoy the safe and fast JSON
|
|
350
|
-
* with confidence.
|
|
332
|
+
* For reference, with type assertion, it is even 5x times faster than the
|
|
333
|
+
* native `JSON.stringify()` function. So, just enjoy the safe and fast JSON
|
|
334
|
+
* conversion with confidence.
|
|
351
335
|
*
|
|
336
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
352
337
|
* @template T Type of the input value
|
|
353
338
|
* @param input A value to be asserted and converted
|
|
354
339
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
355
|
-
* @
|
|
356
|
-
*
|
|
357
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
340
|
+
* @returns JSON string value
|
|
358
341
|
*/
|
|
359
342
|
export function assertStringify<T>(
|
|
360
343
|
input: T,
|
|
361
344
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
362
345
|
): unknown;
|
|
363
346
|
|
|
364
|
-
/**
|
|
365
|
-
* @internal
|
|
366
|
-
*/
|
|
347
|
+
/** @internal */
|
|
367
348
|
export function assertStringify(): string {
|
|
368
349
|
NoTransformConfigurationError("json.assertStringify");
|
|
369
350
|
}
|
|
@@ -372,22 +353,21 @@ export function assertStringify(): string {
|
|
|
372
353
|
* 7x faster `JSON.stringify()` function with type checking.
|
|
373
354
|
*
|
|
374
355
|
* `typia.json.stringify()` is a combination function of {@link is} and
|
|
375
|
-
* {@link stringify}. Therefore, it converts an input value to JSON
|
|
376
|
-
*
|
|
356
|
+
* {@link stringify}. Therefore, it converts an input value to JSON (JavaScript
|
|
357
|
+
* Object Notation) string, with type checking.
|
|
377
358
|
*
|
|
378
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
379
|
-
* `null` value. Otherwise, there's no problem on the `input` value,
|
|
380
|
-
* will be returned.
|
|
359
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
360
|
+
* returns `null` value. Otherwise, there's no problem on the `input` value,
|
|
361
|
+
* JSON string will be returned.
|
|
381
362
|
*
|
|
382
363
|
* For reference, with type checking, it is even 7x times faster than the native
|
|
383
364
|
* `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
|
|
384
365
|
* with confidence.
|
|
385
366
|
*
|
|
367
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
386
368
|
* @template T Type of the input value
|
|
387
369
|
* @param input A value to be checked and converted
|
|
388
|
-
* @
|
|
389
|
-
*
|
|
390
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
370
|
+
* @returns JSON string value when exact type, otherwise null
|
|
391
371
|
*/
|
|
392
372
|
export function isStringify<T>(input: T): string | null;
|
|
393
373
|
|
|
@@ -395,28 +375,25 @@ export function isStringify<T>(input: T): string | null;
|
|
|
395
375
|
* 7x faster `JSON.stringify()` function with type checking.
|
|
396
376
|
*
|
|
397
377
|
* `typia.json.isStringify()` is a combination function of {@link is} and
|
|
398
|
-
* {@link stringify}. Therefore, it converts an input value to JSON
|
|
399
|
-
*
|
|
378
|
+
* {@link stringify}. Therefore, it converts an input value to JSON (JavaScript
|
|
379
|
+
* Object Notation) string, with type checking.
|
|
400
380
|
*
|
|
401
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
402
|
-
* `null` value. Otherwise, there's no problem on the `input` value,
|
|
403
|
-
* will be returned.
|
|
381
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
382
|
+
* returns `null` value. Otherwise, there's no problem on the `input` value,
|
|
383
|
+
* JSON string will be returned.
|
|
404
384
|
*
|
|
405
385
|
* For reference, with type checking, it is even 7x times faster than the native
|
|
406
386
|
* `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
|
|
407
387
|
* with confidence.
|
|
408
388
|
*
|
|
389
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
409
390
|
* @template T Type of the input value
|
|
410
391
|
* @param input A value to be checked and converted
|
|
411
|
-
* @
|
|
412
|
-
*
|
|
413
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
392
|
+
* @returns JSON string value when exact type, otherwise null
|
|
414
393
|
*/
|
|
415
394
|
export function isStringify<T>(input: unknown): string | null;
|
|
416
395
|
|
|
417
|
-
/**
|
|
418
|
-
* @internal
|
|
419
|
-
*/
|
|
396
|
+
/** @internal */
|
|
420
397
|
export function isStringify(): string | null {
|
|
421
398
|
NoTransformConfigurationError("json.isStringify");
|
|
422
399
|
}
|
|
@@ -424,54 +401,52 @@ export function isStringify(): string | null {
|
|
|
424
401
|
/**
|
|
425
402
|
* 5x faster `JSON.stringify()` function with detailed type validation.
|
|
426
403
|
*
|
|
427
|
-
* `typia.json.validateStringify()` is a combination function of {@link validate}
|
|
428
|
-
* {@link stringify}. Therefore, it converts an input value to JSON
|
|
429
|
-
* Notation) string, with detailed type validation.
|
|
404
|
+
* `typia.json.validateStringify()` is a combination function of {@link validate}
|
|
405
|
+
* and {@link stringify}. Therefore, it converts an input value to JSON
|
|
406
|
+
* (JavaScript Object Notation) string, with detailed type validation.
|
|
430
407
|
*
|
|
431
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
432
|
-
* {@link IValidation.IFailure} value with detailed error reasons.
|
|
433
|
-
* there's no problem on the `input` value, JSON string will be
|
|
434
|
-
* property of the output {@link IValidation.ISuccess}
|
|
408
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
409
|
+
* returns {@link IValidation.IFailure} value with detailed error reasons.
|
|
410
|
+
* Otherwise, there's no problem on the `input` value, JSON string will be
|
|
411
|
+
* stored in `data` property of the output {@link IValidation.ISuccess}
|
|
412
|
+
* instance.
|
|
435
413
|
*
|
|
436
|
-
* For reference, with detailed type validation, it is even 5x times faster than
|
|
437
|
-
* native `JSON.stringify()` function. So, just enjoy the safe and fast JSON
|
|
414
|
+
* For reference, with detailed type validation, it is even 5x times faster than
|
|
415
|
+
* the native `JSON.stringify()` function. So, just enjoy the safe and fast JSON
|
|
438
416
|
* conversion with confidence.
|
|
439
417
|
*
|
|
418
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
440
419
|
* @template T Type of the input value
|
|
441
420
|
* @param input A value to be checked and converted
|
|
442
421
|
* @returns Validation result with JSON string value
|
|
443
|
-
*
|
|
444
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
445
422
|
*/
|
|
446
423
|
export function validateStringify<T>(input: T): IValidation<string>;
|
|
447
424
|
|
|
448
425
|
/**
|
|
449
426
|
* 5x faster `JSON.stringify()` function with detailed type validation.
|
|
450
427
|
*
|
|
451
|
-
* `typia.json.validateStringify()` is a combination function of {@link validate}
|
|
452
|
-
* {@link stringify}. Therefore, it converts an input value to JSON
|
|
453
|
-
* Notation) string, with detailed type validation.
|
|
428
|
+
* `typia.json.validateStringify()` is a combination function of {@link validate}
|
|
429
|
+
* and {@link stringify}. Therefore, it converts an input value to JSON
|
|
430
|
+
* (JavaScript Object Notation) string, with detailed type validation.
|
|
454
431
|
*
|
|
455
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
456
|
-
* {@link IValidation.IFailure} value with detailed error reasons.
|
|
457
|
-
* there's no problem on the `input` value, JSON string will be
|
|
458
|
-
* property of the output {@link IValidation.ISuccess}
|
|
432
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
433
|
+
* returns {@link IValidation.IFailure} value with detailed error reasons.
|
|
434
|
+
* Otherwise, there's no problem on the `input` value, JSON string will be
|
|
435
|
+
* stored in `data` property of the output {@link IValidation.ISuccess}
|
|
436
|
+
* instance.
|
|
459
437
|
*
|
|
460
|
-
* For reference, with detailed type validation, it is even 5x times faster than
|
|
461
|
-
* native `JSON.stringify()` function. So, just enjoy the safe and fast JSON
|
|
438
|
+
* For reference, with detailed type validation, it is even 5x times faster than
|
|
439
|
+
* the native `JSON.stringify()` function. So, just enjoy the safe and fast JSON
|
|
462
440
|
* conversion with confidence.
|
|
463
441
|
*
|
|
442
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
464
443
|
* @template T Type of the input value
|
|
465
444
|
* @param input A value to be checked and converted
|
|
466
445
|
* @returns Validation result with JSON string value
|
|
467
|
-
*
|
|
468
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
469
446
|
*/
|
|
470
447
|
export function validateStringify<T>(input: unknown): IValidation<string>;
|
|
471
448
|
|
|
472
|
-
/**
|
|
473
|
-
* @internal
|
|
474
|
-
*/
|
|
449
|
+
/** @internal */
|
|
475
450
|
export function validateStringify(): IValidation<string> {
|
|
476
451
|
NoTransformConfigurationError("json.validateStringify");
|
|
477
452
|
}
|
|
@@ -482,27 +457,23 @@ export function validateStringify(): IValidation<string> {
|
|
|
482
457
|
/**
|
|
483
458
|
* Creates a reusable {@link isParse} function.
|
|
484
459
|
*
|
|
485
|
-
* @danger You must configure the generic argument `T`
|
|
486
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
487
|
-
* @throws compile error
|
|
488
|
-
*
|
|
489
460
|
* @author Jeongho Nam - https://github.com/samchon
|
|
461
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
462
|
+
* @throws Compile error
|
|
463
|
+
* @danger You must configure the generic argument `T`
|
|
490
464
|
*/
|
|
491
465
|
export function createIsParse(): never;
|
|
492
466
|
|
|
493
467
|
/**
|
|
494
468
|
* Creates a reusable {@link isParse} function.
|
|
495
469
|
*
|
|
470
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
496
471
|
* @template T Expected type of parsed value
|
|
497
472
|
* @returns A reusable `isParse` function
|
|
498
|
-
*
|
|
499
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
500
473
|
*/
|
|
501
474
|
export function createIsParse<T>(): (input: string) => Primitive<T> | null;
|
|
502
475
|
|
|
503
|
-
/**
|
|
504
|
-
* @internal
|
|
505
|
-
*/
|
|
476
|
+
/** @internal */
|
|
506
477
|
export function createIsParse<T>(): (input: string) => Primitive<T> | null {
|
|
507
478
|
NoTransformConfigurationError("json.createIsParse");
|
|
508
479
|
}
|
|
@@ -510,12 +481,11 @@ export function createIsParse<T>(): (input: string) => Primitive<T> | null {
|
|
|
510
481
|
/**
|
|
511
482
|
* Creates a reusable {@link assertParse} function.
|
|
512
483
|
*
|
|
513
|
-
* @danger You must configure the generic argument `T`
|
|
514
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
515
|
-
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
516
|
-
* @throws compile error
|
|
517
|
-
*
|
|
518
484
|
* @author Jeongho Nam - https://github.com/samchon
|
|
485
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
486
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
487
|
+
* @throws Compile error
|
|
488
|
+
* @danger You must configure the generic argument `T`
|
|
519
489
|
*/
|
|
520
490
|
export function createAssertParse(
|
|
521
491
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
@@ -524,19 +494,16 @@ export function createAssertParse(
|
|
|
524
494
|
/**
|
|
525
495
|
* Creates a reusable {@link assertParse} function.
|
|
526
496
|
*
|
|
497
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
527
498
|
* @template T Expected type of parsed value
|
|
528
499
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
529
500
|
* @returns A reusable `assertParse` function
|
|
530
|
-
*
|
|
531
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
532
501
|
*/
|
|
533
502
|
export function createAssertParse<T>(
|
|
534
503
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
535
504
|
): (input: string) => Primitive<T>;
|
|
536
505
|
|
|
537
|
-
/**
|
|
538
|
-
* @internal
|
|
539
|
-
*/
|
|
506
|
+
/** @internal */
|
|
540
507
|
export function createAssertParse<T>(): (input: string) => Primitive<T> {
|
|
541
508
|
NoTransformConfigurationError("json.createAssertParse");
|
|
542
509
|
}
|
|
@@ -544,29 +511,25 @@ export function createAssertParse<T>(): (input: string) => Primitive<T> {
|
|
|
544
511
|
/**
|
|
545
512
|
* Creates a reusable {@link validateParse} function.
|
|
546
513
|
*
|
|
547
|
-
* @danger You must configure the generic argument `T`
|
|
548
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
549
|
-
* @throws compile error
|
|
550
|
-
*
|
|
551
514
|
* @author Jeongho Nam - https://github.com/samchon
|
|
515
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
516
|
+
* @throws Compile error
|
|
517
|
+
* @danger You must configure the generic argument `T`
|
|
552
518
|
*/
|
|
553
519
|
export function createValidateParse(): never;
|
|
554
520
|
|
|
555
521
|
/**
|
|
556
522
|
* Creates a reusable {@link validateParse} function.
|
|
557
523
|
*
|
|
524
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
558
525
|
* @template T Expected type of parsed value
|
|
559
526
|
* @returns A reusable `validateParse` function
|
|
560
|
-
*
|
|
561
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
562
527
|
*/
|
|
563
528
|
export function createValidateParse<T>(): (
|
|
564
529
|
input: string,
|
|
565
530
|
) => IValidation<Primitive<T>>;
|
|
566
531
|
|
|
567
|
-
/**
|
|
568
|
-
* @internal
|
|
569
|
-
*/
|
|
532
|
+
/** @internal */
|
|
570
533
|
export function createValidateParse<T>(): (
|
|
571
534
|
input: string,
|
|
572
535
|
) => IValidation<Primitive<T>> {
|
|
@@ -576,27 +539,23 @@ export function createValidateParse<T>(): (
|
|
|
576
539
|
/**
|
|
577
540
|
* Creates a reusable {@link stringify} function.
|
|
578
541
|
*
|
|
579
|
-
* @danger You must configure the generic argument `T`
|
|
580
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
581
|
-
* @throws compile error
|
|
582
|
-
*
|
|
583
542
|
* @author Jeongho Nam - https://github.com/samchon
|
|
543
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
544
|
+
* @throws Compile error
|
|
545
|
+
* @danger You must configure the generic argument `T`
|
|
584
546
|
*/
|
|
585
547
|
export function createStringify(): never;
|
|
586
548
|
|
|
587
549
|
/**
|
|
588
550
|
* Creates a reusable {@link stringify} function.
|
|
589
551
|
*
|
|
552
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
590
553
|
* @template T Type of the input value
|
|
591
554
|
* @returns A reusable `stringify` function
|
|
592
|
-
*
|
|
593
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
594
555
|
*/
|
|
595
556
|
export function createStringify<T>(): (input: T) => string;
|
|
596
557
|
|
|
597
|
-
/**
|
|
598
|
-
* @internal
|
|
599
|
-
*/
|
|
558
|
+
/** @internal */
|
|
600
559
|
export function createStringify<T>(): (input: T) => string {
|
|
601
560
|
NoTransformConfigurationError("json.createStringify");
|
|
602
561
|
}
|
|
@@ -604,12 +563,11 @@ export function createStringify<T>(): (input: T) => string {
|
|
|
604
563
|
/**
|
|
605
564
|
* Creates a reusable {@link assertStringify} function.
|
|
606
565
|
*
|
|
607
|
-
* @
|
|
566
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
608
567
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
609
568
|
* @returns Nothing until you configure the generic argument `T`
|
|
610
|
-
* @throws
|
|
611
|
-
*
|
|
612
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
569
|
+
* @throws Compile error
|
|
570
|
+
* @danger You must configure the generic argument `T`
|
|
613
571
|
*/
|
|
614
572
|
export function createAssertStringify(
|
|
615
573
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
@@ -618,19 +576,16 @@ export function createAssertStringify(
|
|
|
618
576
|
/**
|
|
619
577
|
* Creates a reusable {@link assertStringify} function.
|
|
620
578
|
*
|
|
579
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
621
580
|
* @template T Type of the input value
|
|
622
581
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
623
582
|
* @returns A reusable `assertStringify` function
|
|
624
|
-
*
|
|
625
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
626
583
|
*/
|
|
627
584
|
export function createAssertStringify<T>(
|
|
628
585
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
629
586
|
): (input: unknown) => string;
|
|
630
587
|
|
|
631
|
-
/**
|
|
632
|
-
* @internal
|
|
633
|
-
*/
|
|
588
|
+
/** @internal */
|
|
634
589
|
export function createAssertStringify(): (input: unknown) => string {
|
|
635
590
|
NoTransformConfigurationError("json.createAssertStringify");
|
|
636
591
|
}
|
|
@@ -638,27 +593,23 @@ export function createAssertStringify(): (input: unknown) => string {
|
|
|
638
593
|
/**
|
|
639
594
|
* Creates a reusable {@link isStringify} function.
|
|
640
595
|
*
|
|
641
|
-
* @danger You must configure the generic argument `T`
|
|
642
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
643
|
-
* @throws compile error
|
|
644
|
-
*
|
|
645
596
|
* @author Jeongho Nam - https://github.com/samchon
|
|
597
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
598
|
+
* @throws Compile error
|
|
599
|
+
* @danger You must configure the generic argument `T`
|
|
646
600
|
*/
|
|
647
601
|
export function createIsStringify(): never;
|
|
648
602
|
|
|
649
603
|
/**
|
|
650
604
|
* Creates a reusable {@link isStringify} function.
|
|
651
605
|
*
|
|
606
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
652
607
|
* @template T Type of the input value
|
|
653
608
|
* @returns A reusable `isStringify` function
|
|
654
|
-
*
|
|
655
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
656
609
|
*/
|
|
657
610
|
export function createIsStringify<T>(): (input: unknown) => string | null;
|
|
658
611
|
|
|
659
|
-
/**
|
|
660
|
-
* @internal
|
|
661
|
-
*/
|
|
612
|
+
/** @internal */
|
|
662
613
|
export function createIsStringify(): (input: unknown) => string | null {
|
|
663
614
|
NoTransformConfigurationError("json.createIsStringify");
|
|
664
615
|
}
|
|
@@ -666,29 +617,25 @@ export function createIsStringify(): (input: unknown) => string | null {
|
|
|
666
617
|
/**
|
|
667
618
|
* Creates a reusable {@link validateStringify} function.
|
|
668
619
|
*
|
|
669
|
-
* @danger You must configure the generic argument `T`
|
|
670
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
671
|
-
* @throws compile error
|
|
672
|
-
*
|
|
673
620
|
* @author Jeongho Nam - https://github.com/samchon
|
|
621
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
622
|
+
* @throws Compile error
|
|
623
|
+
* @danger You must configure the generic argument `T`
|
|
674
624
|
*/
|
|
675
625
|
export function createValidateStringify(): never;
|
|
676
626
|
|
|
677
627
|
/**
|
|
678
628
|
* Creates a reusable {@link validateStringify} function.
|
|
679
629
|
*
|
|
630
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
680
631
|
* @template T Type of the input value
|
|
681
632
|
* @returns A reusable `validateStringify` function
|
|
682
|
-
|
|
683
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
684
633
|
*/
|
|
685
634
|
export function createValidateStringify<T>(): (
|
|
686
635
|
input: unknown,
|
|
687
636
|
) => IValidation<string>;
|
|
688
637
|
|
|
689
|
-
/**
|
|
690
|
-
* @internal
|
|
691
|
-
*/
|
|
638
|
+
/** @internal */
|
|
692
639
|
export function createValidateStringify(): (
|
|
693
640
|
input: unknown,
|
|
694
641
|
) => IValidation<string> {
|