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/json.d.ts
CHANGED
|
@@ -8,37 +8,37 @@ import { TypeGuardError } from "./TypeGuardError";
|
|
|
8
8
|
*
|
|
9
9
|
* JSON Schemas Generator.
|
|
10
10
|
*
|
|
11
|
-
* Creates a JSON schema list which contains both main JSON schemas
|
|
12
|
-
*
|
|
11
|
+
* Creates a JSON schema list which contains both main JSON schemas and
|
|
12
|
+
* components. Note that, all of the named types are stored in the
|
|
13
13
|
* {@link IJsonSchemaCollection.components} property for the `$ref` referencing.
|
|
14
14
|
*
|
|
15
15
|
* Also, you can specify the OpenAPI version by configuring the second generic
|
|
16
|
-
* argument `Version`. For reference, the default version is `"3.1"`, and the
|
|
17
|
-
* difference between `"3.0"` and `"3.1"` is whether supporting the tuple
|
|
16
|
+
* argument `Version`. For reference, the default version is `"3.1"`, and the
|
|
17
|
+
* key difference between `"3.0"` and `"3.1"` is whether supporting the tuple
|
|
18
|
+
* type or not.
|
|
18
19
|
*
|
|
20
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
19
21
|
* @template Types Tuple of target types
|
|
20
22
|
* @template Version Version of OpenAPI specification. Default is 3.1
|
|
21
|
-
* @
|
|
22
|
-
*
|
|
23
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
23
|
+
* @returns JSON schema collection
|
|
24
24
|
*/
|
|
25
25
|
export declare function schemas(): never;
|
|
26
26
|
/**
|
|
27
27
|
* JSON Schemas Generator.
|
|
28
28
|
*
|
|
29
|
-
* Creates a JSON schema list which contains both main JSON schemas
|
|
30
|
-
*
|
|
29
|
+
* Creates a JSON schema list which contains both main JSON schemas and
|
|
30
|
+
* components. Note that, all of the named types are stored in the
|
|
31
31
|
* {@link IJsonSchemaCollection.components} property for the `$ref` referencing.
|
|
32
32
|
*
|
|
33
33
|
* Also, you can specify the OpenAPI version by configuring the second generic
|
|
34
|
-
* argument `Version`. For reference, the default version is `"3.1"`, and the
|
|
35
|
-
* difference between `"3.0"` and `"3.1"` is whether supporting the tuple
|
|
34
|
+
* argument `Version`. For reference, the default version is `"3.1"`, and the
|
|
35
|
+
* key difference between `"3.0"` and `"3.1"` is whether supporting the tuple
|
|
36
|
+
* type or not.
|
|
36
37
|
*
|
|
38
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
37
39
|
* @template Types Tuple of target types
|
|
38
40
|
* @template Version Version of OpenAPI specification. Default is 3.1
|
|
39
|
-
* @
|
|
40
|
-
*
|
|
41
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
41
|
+
* @returns JSON schema collection
|
|
42
42
|
*/
|
|
43
43
|
export declare function schemas<Types extends unknown[], Version extends "3.0" | "3.1" = "3.1">(): IJsonSchemaCollection<Version, Types>;
|
|
44
44
|
/**
|
|
@@ -46,39 +46,37 @@ export declare function schemas<Types extends unknown[], Version extends "3.0" |
|
|
|
46
46
|
*
|
|
47
47
|
* JSON schema generator.
|
|
48
48
|
*
|
|
49
|
-
* Creates a JSON schema unit which contains a main JSON schema and
|
|
50
|
-
*
|
|
49
|
+
* Creates a JSON schema unit which contains a main JSON schema and its
|
|
50
|
+
* components. Note that, all of the named types are stored in the
|
|
51
51
|
* {@link IJsonSchemaUnit.components} property for the `$ref` referencing.
|
|
52
52
|
*
|
|
53
|
-
* Also, you can specify the OpenAPI version by configuring the second
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
53
|
+
* Also, you can specify the OpenAPI version by configuring the second generic
|
|
54
|
+
* argument `Version`. For reference, the default version is `"3.1"`, and key
|
|
55
|
+
* different of `"3.0"` and `"3.1"` is whether supporting the tuple type or
|
|
56
|
+
* not.
|
|
57
57
|
*
|
|
58
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
58
59
|
* @template Type Target type
|
|
59
60
|
* @template Version Version of OpenAPI specification. Default is 3.1
|
|
60
|
-
* @
|
|
61
|
-
*
|
|
62
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
61
|
+
* @returns JSON schema unit
|
|
63
62
|
*/
|
|
64
63
|
export declare function schema(): never;
|
|
65
64
|
/**
|
|
66
65
|
* JSON schema generator.
|
|
67
66
|
*
|
|
68
|
-
* Creates a JSON schema unit which contains a main JSON schema and
|
|
69
|
-
*
|
|
67
|
+
* Creates a JSON schema unit which contains a main JSON schema and its
|
|
68
|
+
* components. Note that, all of the named types are stored in the
|
|
70
69
|
* {@link IJsonSchemaUnit.components} property for the `$ref` referencing.
|
|
71
70
|
*
|
|
72
|
-
* Also, you can specify the OpenAPI version by configuring the second
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
71
|
+
* Also, you can specify the OpenAPI version by configuring the second generic
|
|
72
|
+
* argument `Version`. For reference, the default version is `"3.1"`, and key
|
|
73
|
+
* different of `"3.0"` and `"3.1"` is whether supporting the tuple type or
|
|
74
|
+
* not.
|
|
76
75
|
*
|
|
76
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
77
77
|
* @template Type Target type
|
|
78
78
|
* @template Version Version of OpenAPI specification. Default is 3.1
|
|
79
|
-
* @
|
|
80
|
-
*
|
|
81
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
79
|
+
* @returns JSON schema unit
|
|
82
80
|
*/
|
|
83
81
|
export declare function schema<Type extends unknown, Version extends "3.0" | "3.1" = "3.1">(): IJsonSchemaUnit<Version, Type>;
|
|
84
82
|
/**
|
|
@@ -87,39 +85,38 @@ export declare function schema<Type extends unknown, Version extends "3.0" | "3.
|
|
|
87
85
|
* Safe `JSON.parse()` function with type assertion.
|
|
88
86
|
*
|
|
89
87
|
* `typia.json.assertParse()` is a combination function of `JSON.parse()` and
|
|
90
|
-
* {@link assert}. Therefore, it converts a JSON (JavaScript Object Notation)
|
|
91
|
-
* to a `T` typed instance with type assertion.
|
|
88
|
+
* {@link assert}. Therefore, it converts a JSON (JavaScript Object Notation)
|
|
89
|
+
* string to a `T` typed instance with type assertion.
|
|
92
90
|
*
|
|
93
|
-
* In such reason, when parsed JSON string value is not matched with the type
|
|
94
|
-
* throws {@link TypeGuardError} or custom error generated by
|
|
95
|
-
* if there's no problem with the parsed value, the
|
|
91
|
+
* In such reason, when parsed JSON string value is not matched with the type
|
|
92
|
+
* `T`, it throws {@link TypeGuardError} or custom error generated by
|
|
93
|
+
* _errorFactory_. Otherwise, if there's no problem with the parsed value, the
|
|
94
|
+
* parsed value will be returned.
|
|
96
95
|
*
|
|
96
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
97
97
|
* @template T Expected type of parsed value
|
|
98
98
|
* @param input JSON string
|
|
99
99
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
100
100
|
* @returns Parsed value
|
|
101
|
-
*
|
|
102
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
103
101
|
*/
|
|
104
102
|
export declare function assertParse(input: string, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
105
103
|
/**
|
|
106
104
|
* Safe `JSON.parse()` function with type assertion.
|
|
107
105
|
*
|
|
108
106
|
* `typia.json.assertParse()` is a combination function of `JSON.parse()` and
|
|
109
|
-
* {@link assert}. Therefore, it converts a JSON (JavaScript Object Notation)
|
|
110
|
-
* to a `T` typed instance with type assertion.
|
|
107
|
+
* {@link assert}. Therefore, it converts a JSON (JavaScript Object Notation)
|
|
108
|
+
* string to a `T` typed instance with type assertion.
|
|
111
109
|
*
|
|
112
|
-
* In such reason, when parsed JSON string value is not matched with the type
|
|
113
|
-
* it throws {@link TypeGuardError} or custom error generated by
|
|
114
|
-
* Otherwise, there's no problem on the parsed value, the parsed
|
|
115
|
-
* returned.
|
|
110
|
+
* In such reason, when parsed JSON string value is not matched with the type
|
|
111
|
+
* `T`, it throws {@link TypeGuardError} or custom error generated by
|
|
112
|
+
* _errorFactory_. Otherwise, there's no problem on the parsed value, the parsed
|
|
113
|
+
* value would be returned.
|
|
116
114
|
*
|
|
115
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
117
116
|
* @template T Expected type of parsed value
|
|
118
117
|
* @param input JSON string
|
|
119
118
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
120
119
|
* @returns Parsed value
|
|
121
|
-
*
|
|
122
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
123
120
|
*/
|
|
124
121
|
export declare function assertParse<T>(input: string, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Primitive<T>;
|
|
125
122
|
/**
|
|
@@ -127,37 +124,35 @@ export declare function assertParse<T>(input: string, errorFactory?: undefined |
|
|
|
127
124
|
*
|
|
128
125
|
* Safe `JSON.parse()` function with type checking.
|
|
129
126
|
*
|
|
130
|
-
* `typia.json.isParse()` is a combination function of `JSON.parse()` and
|
|
131
|
-
* Therefore, it converts a JSON (JavaScript Object Notation) string
|
|
132
|
-
* instance with type checking.
|
|
127
|
+
* `typia.json.isParse()` is a combination function of `JSON.parse()` and
|
|
128
|
+
* {@link is}. Therefore, it converts a JSON (JavaScript Object Notation) string
|
|
129
|
+
* to a `T` typed instance with type checking.
|
|
133
130
|
*
|
|
134
|
-
* In such reason, when parsed JSON string value is not matched with the type
|
|
135
|
-
* returns `null` value. Otherwise, there's no problem on the parsed
|
|
136
|
-
* value will be returned.
|
|
131
|
+
* In such reason, when parsed JSON string value is not matched with the type
|
|
132
|
+
* `T`, it returns `null` value. Otherwise, there's no problem on the parsed
|
|
133
|
+
* value, the parsed value will be returned.
|
|
137
134
|
*
|
|
135
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
138
136
|
* @template T Expected type of parsed value
|
|
139
137
|
* @param input JSON string
|
|
140
138
|
* @returns Parsed value when exact type, otherwise `null`
|
|
141
|
-
*
|
|
142
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
143
139
|
*/
|
|
144
140
|
export declare function isParse(input: string): never;
|
|
145
141
|
/**
|
|
146
142
|
* Safe `JSON.parse()` function with type checking.
|
|
147
143
|
*
|
|
148
|
-
* `typia.json.isParse()` is a combination function of `JSON.parse()` and
|
|
149
|
-
* Therefore, it converts a JSON (JavaScript Object Notation) string
|
|
150
|
-
* instance with type checking.
|
|
144
|
+
* `typia.json.isParse()` is a combination function of `JSON.parse()` and
|
|
145
|
+
* {@link is}. Therefore, it converts a JSON (JavaScript Object Notation) string
|
|
146
|
+
* to a `T` typed instance with type checking.
|
|
151
147
|
*
|
|
152
|
-
* In such reason, when parsed JSON string value is not matched with the type
|
|
153
|
-
* returns `null` value. Otherwise, there's no problem on the parsed
|
|
154
|
-
* value will be returned.
|
|
148
|
+
* In such reason, when parsed JSON string value is not matched with the type
|
|
149
|
+
* `T`, it returns `null` value. Otherwise, there's no problem on the parsed
|
|
150
|
+
* value, the parsed value will be returned.
|
|
155
151
|
*
|
|
152
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
156
153
|
* @template T Expected type of parsed value
|
|
157
154
|
* @param input JSON string
|
|
158
155
|
* @returns Parsed value when exact type, otherwise `null`
|
|
159
|
-
*
|
|
160
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
161
156
|
*/
|
|
162
157
|
export declare function isParse<T>(input: string): Primitive<T> | null;
|
|
163
158
|
/**
|
|
@@ -166,333 +161,317 @@ export declare function isParse<T>(input: string): Primitive<T> | null;
|
|
|
166
161
|
* Safe `JSON.parse()` function with detailed type validation.
|
|
167
162
|
*
|
|
168
163
|
* `typia.json.validateParse()` is a combination function of `JSON.parse()` and
|
|
169
|
-
* {@link validate}. Therefore, it converts a JSON (JavaScript Object Notation)
|
|
170
|
-
* to a `T` typed instance with detailed type validation.
|
|
164
|
+
* {@link validate}. Therefore, it converts a JSON (JavaScript Object Notation)
|
|
165
|
+
* string to a `T` typed instance with detailed type validation.
|
|
171
166
|
*
|
|
172
|
-
* In such reason, when parsed JSON string value is not matched with the type
|
|
173
|
-
* returns {@link IValidation.IFailure} value with detailed error
|
|
174
|
-
* there's no problem on the parsed value, the parsed value
|
|
175
|
-
* property of the output {@link IValidation.ISuccess}
|
|
167
|
+
* In such reason, when parsed JSON string value is not matched with the type
|
|
168
|
+
* `T`, it returns {@link IValidation.IFailure} value with detailed error
|
|
169
|
+
* reasons. Otherwise, there's no problem on the parsed value, the parsed value
|
|
170
|
+
* will be stored in `data` property of the output {@link IValidation.ISuccess}
|
|
171
|
+
* instance.
|
|
176
172
|
*
|
|
173
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
177
174
|
* @template T Expected type of parsed value
|
|
178
175
|
* @param input JSON string
|
|
179
176
|
* @returns Validation result with JSON parsed value
|
|
180
|
-
*
|
|
181
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
182
177
|
*/
|
|
183
178
|
export declare function validateParse(input: string): never;
|
|
184
179
|
/**
|
|
185
180
|
* Safe `JSON.parse()` function with detailed type validation.
|
|
186
181
|
*
|
|
187
182
|
* `typia.json.validateParse()` is a combination function of `JSON.parse()` and
|
|
188
|
-
* {@link validate}. Therefore, it converts a JSON (JavaScript Object Notation)
|
|
189
|
-
* to a `T` typed instance with detailed type validation.
|
|
183
|
+
* {@link validate}. Therefore, it converts a JSON (JavaScript Object Notation)
|
|
184
|
+
* string to a `T` typed instance with detailed type validation.
|
|
190
185
|
*
|
|
191
|
-
* In such reason, when parsed JSON string value is not matched with the type
|
|
192
|
-
* returns {@link IValidation.IFailure} value with detailed error
|
|
193
|
-
* there's no problem on the parsed value, the parsed value
|
|
194
|
-
* property of the output {@link IValidation.ISuccess}
|
|
186
|
+
* In such reason, when parsed JSON string value is not matched with the type
|
|
187
|
+
* `T`, it returns {@link IValidation.IFailure} value with detailed error
|
|
188
|
+
* reasons. Otherwise, there's no problem on the parsed value, the parsed value
|
|
189
|
+
* will be stored in `data` property of the output {@link IValidation.ISuccess}
|
|
190
|
+
* instance.
|
|
195
191
|
*
|
|
192
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
196
193
|
* @template T Expected type of parsed value
|
|
197
194
|
* @param input JSON string
|
|
198
195
|
* @returns Validation result with JSON parsed value
|
|
199
|
-
*
|
|
200
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
201
196
|
*/
|
|
202
197
|
export declare function validateParse<T>(input: string): IValidation<Primitive<T>>;
|
|
203
198
|
/**
|
|
204
199
|
* 8x faster `JSON.stringify()` function.
|
|
205
200
|
*
|
|
206
|
-
* Converts an input value to a JSON (JavaScript Object Notation) string, about
|
|
207
|
-
* faster than the native `JSON.stringify()` function. The 5x faster
|
|
208
|
-
* because it writes an optimized JSON conversion plan, only for
|
|
201
|
+
* Converts an input value to a JSON (JavaScript Object Notation) string, about
|
|
202
|
+
* 8x faster than the native `JSON.stringify()` function. The 5x faster
|
|
203
|
+
* principle is because it writes an optimized JSON conversion plan, only for
|
|
204
|
+
* the type `T`.
|
|
209
205
|
*
|
|
210
|
-
* For reference, this `typia.json.stringify()` does not validate the input
|
|
211
|
-
* It just believes that the input value is following the type `T`.
|
|
212
|
-
* can't ensure the input value type, it will be better to
|
|
213
|
-
* functions instead.
|
|
206
|
+
* For reference, this `typia.json.stringify()` does not validate the input
|
|
207
|
+
* value type. It just believes that the input value is following the type `T`.
|
|
208
|
+
* Therefore, if you can't ensure the input value type, it will be better to
|
|
209
|
+
* call one of below functions instead.
|
|
214
210
|
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
211
|
+
* - {@link assertStringify}
|
|
212
|
+
* - {@link isStringify}
|
|
213
|
+
* - {@link validateStringify}
|
|
218
214
|
*
|
|
215
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
219
216
|
* @template T Type of the input value
|
|
220
217
|
* @param input A value to be converted
|
|
221
|
-
* @
|
|
222
|
-
*
|
|
223
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
218
|
+
* @returns JSON string value
|
|
224
219
|
*/
|
|
225
220
|
export declare function stringify<T>(input: T): string;
|
|
226
221
|
/**
|
|
227
222
|
* 5x faster `JSON.stringify()` function with type assertion.
|
|
228
223
|
*
|
|
229
224
|
* `typia.json.assertStringify()` is a combination function of {@link assert} and
|
|
230
|
-
* {@link stringify}. Therefore, it converts an input value to
|
|
231
|
-
*
|
|
225
|
+
* {@link stringify}. Therefore, it converts an input value to JSON (JavaScript
|
|
226
|
+
* Object Notation) string, with type assertion.
|
|
232
227
|
*
|
|
233
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
234
|
-
* {@link TypeGuardError} or custom error generated by
|
|
235
|
-
* there's no problem on the `input` value, JSON string will be
|
|
228
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
229
|
+
* throws an {@link TypeGuardError} or custom error generated by _errorFactory_.
|
|
230
|
+
* Otherwise, there's no problem on the `input` value, JSON string will be
|
|
231
|
+
* returned.
|
|
236
232
|
*
|
|
237
|
-
* For reference, with type assertion, it is even 5x times faster than the
|
|
238
|
-
* `JSON.stringify()` function. So, just enjoy the safe and fast JSON
|
|
239
|
-
* with confidence.
|
|
233
|
+
* For reference, with type assertion, it is even 5x times faster than the
|
|
234
|
+
* native `JSON.stringify()` function. So, just enjoy the safe and fast JSON
|
|
235
|
+
* conversion with confidence.
|
|
240
236
|
*
|
|
237
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
241
238
|
* @template T Type of the input value
|
|
242
239
|
* @param input A value to be asserted and converted
|
|
243
240
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
244
|
-
* @
|
|
245
|
-
*
|
|
246
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
241
|
+
* @returns JSON string value
|
|
247
242
|
*/
|
|
248
243
|
export declare function assertStringify<T>(input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): string;
|
|
249
244
|
/**
|
|
250
245
|
* 5x faster `JSON.stringify()` function with type assertion.
|
|
251
246
|
*
|
|
252
247
|
* `typia.json.assertStringify()` is a combination function of {@link assert} and
|
|
253
|
-
* {@link stringify}. Therefore, it converts an input value to
|
|
254
|
-
*
|
|
248
|
+
* {@link stringify}. Therefore, it converts an input value to JSON (JavaScript
|
|
249
|
+
* Object Notation) string, with type assertion.
|
|
255
250
|
*
|
|
256
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
257
|
-
* {@link TypeGuardError} or custom error generated by
|
|
258
|
-
* there's no problem on the `input` value, JSON string will be
|
|
251
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
252
|
+
* throws an {@link TypeGuardError} or custom error generated by _errorFactory_.
|
|
253
|
+
* Otherwise, there's no problem on the `input` value, JSON string will be
|
|
254
|
+
* returned.
|
|
259
255
|
*
|
|
260
|
-
* For reference, with type assertion, it is even 5x times faster than the
|
|
261
|
-
* `JSON.stringify()` function. So, just enjoy the safe and fast JSON
|
|
262
|
-
* with confidence.
|
|
256
|
+
* For reference, with type assertion, it is even 5x times faster than the
|
|
257
|
+
* native `JSON.stringify()` function. So, just enjoy the safe and fast JSON
|
|
258
|
+
* conversion with confidence.
|
|
263
259
|
*
|
|
260
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
264
261
|
* @template T Type of the input value
|
|
265
262
|
* @param input A value to be asserted and converted
|
|
266
263
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
267
|
-
* @
|
|
268
|
-
*
|
|
269
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
264
|
+
* @returns JSON string value
|
|
270
265
|
*/
|
|
271
266
|
export declare function assertStringify<T>(input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): unknown;
|
|
272
267
|
/**
|
|
273
268
|
* 7x faster `JSON.stringify()` function with type checking.
|
|
274
269
|
*
|
|
275
270
|
* `typia.json.stringify()` is a combination function of {@link is} and
|
|
276
|
-
* {@link stringify}. Therefore, it converts an input value to JSON
|
|
277
|
-
*
|
|
271
|
+
* {@link stringify}. Therefore, it converts an input value to JSON (JavaScript
|
|
272
|
+
* Object Notation) string, with type checking.
|
|
278
273
|
*
|
|
279
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
280
|
-
* `null` value. Otherwise, there's no problem on the `input` value,
|
|
281
|
-
* will be returned.
|
|
274
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
275
|
+
* returns `null` value. Otherwise, there's no problem on the `input` value,
|
|
276
|
+
* JSON string will be returned.
|
|
282
277
|
*
|
|
283
278
|
* For reference, with type checking, it is even 7x times faster than the native
|
|
284
279
|
* `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
|
|
285
280
|
* with confidence.
|
|
286
281
|
*
|
|
282
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
287
283
|
* @template T Type of the input value
|
|
288
284
|
* @param input A value to be checked and converted
|
|
289
|
-
* @
|
|
290
|
-
*
|
|
291
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
285
|
+
* @returns JSON string value when exact type, otherwise null
|
|
292
286
|
*/
|
|
293
287
|
export declare function isStringify<T>(input: T): string | null;
|
|
294
288
|
/**
|
|
295
289
|
* 7x faster `JSON.stringify()` function with type checking.
|
|
296
290
|
*
|
|
297
291
|
* `typia.json.isStringify()` is a combination function of {@link is} and
|
|
298
|
-
* {@link stringify}. Therefore, it converts an input value to JSON
|
|
299
|
-
*
|
|
292
|
+
* {@link stringify}. Therefore, it converts an input value to JSON (JavaScript
|
|
293
|
+
* Object Notation) string, with type checking.
|
|
300
294
|
*
|
|
301
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
302
|
-
* `null` value. Otherwise, there's no problem on the `input` value,
|
|
303
|
-
* will be returned.
|
|
295
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
296
|
+
* returns `null` value. Otherwise, there's no problem on the `input` value,
|
|
297
|
+
* JSON string will be returned.
|
|
304
298
|
*
|
|
305
299
|
* For reference, with type checking, it is even 7x times faster than the native
|
|
306
300
|
* `JSON.stringify()` function. So, just enjoy the safe and fast JSON conversion
|
|
307
301
|
* with confidence.
|
|
308
302
|
*
|
|
303
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
309
304
|
* @template T Type of the input value
|
|
310
305
|
* @param input A value to be checked and converted
|
|
311
|
-
* @
|
|
312
|
-
*
|
|
313
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
306
|
+
* @returns JSON string value when exact type, otherwise null
|
|
314
307
|
*/
|
|
315
308
|
export declare function isStringify<T>(input: unknown): string | null;
|
|
316
309
|
/**
|
|
317
310
|
* 5x faster `JSON.stringify()` function with detailed type validation.
|
|
318
311
|
*
|
|
319
|
-
* `typia.json.validateStringify()` is a combination function of {@link validate}
|
|
320
|
-
* {@link stringify}. Therefore, it converts an input value to JSON
|
|
321
|
-
* Notation) string, with detailed type validation.
|
|
312
|
+
* `typia.json.validateStringify()` is a combination function of {@link validate}
|
|
313
|
+
* and {@link stringify}. Therefore, it converts an input value to JSON
|
|
314
|
+
* (JavaScript Object Notation) string, with detailed type validation.
|
|
322
315
|
*
|
|
323
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
324
|
-
* {@link IValidation.IFailure} value with detailed error reasons.
|
|
325
|
-
* there's no problem on the `input` value, JSON string will be
|
|
326
|
-
* property of the output {@link IValidation.ISuccess}
|
|
316
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
317
|
+
* returns {@link IValidation.IFailure} value with detailed error reasons.
|
|
318
|
+
* Otherwise, there's no problem on the `input` value, JSON string will be
|
|
319
|
+
* stored in `data` property of the output {@link IValidation.ISuccess}
|
|
320
|
+
* instance.
|
|
327
321
|
*
|
|
328
|
-
* For reference, with detailed type validation, it is even 5x times faster than
|
|
329
|
-
* native `JSON.stringify()` function. So, just enjoy the safe and fast JSON
|
|
322
|
+
* For reference, with detailed type validation, it is even 5x times faster than
|
|
323
|
+
* the native `JSON.stringify()` function. So, just enjoy the safe and fast JSON
|
|
330
324
|
* conversion with confidence.
|
|
331
325
|
*
|
|
326
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
332
327
|
* @template T Type of the input value
|
|
333
328
|
* @param input A value to be checked and converted
|
|
334
329
|
* @returns Validation result with JSON string value
|
|
335
|
-
*
|
|
336
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
337
330
|
*/
|
|
338
331
|
export declare function validateStringify<T>(input: T): IValidation<string>;
|
|
339
332
|
/**
|
|
340
333
|
* 5x faster `JSON.stringify()` function with detailed type validation.
|
|
341
334
|
*
|
|
342
|
-
* `typia.json.validateStringify()` is a combination function of {@link validate}
|
|
343
|
-
* {@link stringify}. Therefore, it converts an input value to JSON
|
|
344
|
-
* Notation) string, with detailed type validation.
|
|
335
|
+
* `typia.json.validateStringify()` is a combination function of {@link validate}
|
|
336
|
+
* and {@link stringify}. Therefore, it converts an input value to JSON
|
|
337
|
+
* (JavaScript Object Notation) string, with detailed type validation.
|
|
345
338
|
*
|
|
346
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
347
|
-
* {@link IValidation.IFailure} value with detailed error reasons.
|
|
348
|
-
* there's no problem on the `input` value, JSON string will be
|
|
349
|
-
* property of the output {@link IValidation.ISuccess}
|
|
339
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
340
|
+
* returns {@link IValidation.IFailure} value with detailed error reasons.
|
|
341
|
+
* Otherwise, there's no problem on the `input` value, JSON string will be
|
|
342
|
+
* stored in `data` property of the output {@link IValidation.ISuccess}
|
|
343
|
+
* instance.
|
|
350
344
|
*
|
|
351
|
-
* For reference, with detailed type validation, it is even 5x times faster than
|
|
352
|
-
* native `JSON.stringify()` function. So, just enjoy the safe and fast JSON
|
|
345
|
+
* For reference, with detailed type validation, it is even 5x times faster than
|
|
346
|
+
* the native `JSON.stringify()` function. So, just enjoy the safe and fast JSON
|
|
353
347
|
* conversion with confidence.
|
|
354
348
|
*
|
|
349
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
355
350
|
* @template T Type of the input value
|
|
356
351
|
* @param input A value to be checked and converted
|
|
357
352
|
* @returns Validation result with JSON string value
|
|
358
|
-
*
|
|
359
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
360
353
|
*/
|
|
361
354
|
export declare function validateStringify<T>(input: unknown): IValidation<string>;
|
|
362
355
|
/**
|
|
363
356
|
* Creates a reusable {@link isParse} function.
|
|
364
357
|
*
|
|
365
|
-
* @danger You must configure the generic argument `T`
|
|
366
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
367
|
-
* @throws compile error
|
|
368
|
-
*
|
|
369
358
|
* @author Jeongho Nam - https://github.com/samchon
|
|
359
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
360
|
+
* @throws Compile error
|
|
361
|
+
* @danger You must configure the generic argument `T`
|
|
370
362
|
*/
|
|
371
363
|
export declare function createIsParse(): never;
|
|
372
364
|
/**
|
|
373
365
|
* Creates a reusable {@link isParse} function.
|
|
374
366
|
*
|
|
367
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
375
368
|
* @template T Expected type of parsed value
|
|
376
369
|
* @returns A reusable `isParse` function
|
|
377
|
-
*
|
|
378
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
379
370
|
*/
|
|
380
371
|
export declare function createIsParse<T>(): (input: string) => Primitive<T> | null;
|
|
381
372
|
/**
|
|
382
373
|
* Creates a reusable {@link assertParse} function.
|
|
383
374
|
*
|
|
384
|
-
* @danger You must configure the generic argument `T`
|
|
385
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
386
|
-
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
387
|
-
* @throws compile error
|
|
388
|
-
*
|
|
389
375
|
* @author Jeongho Nam - https://github.com/samchon
|
|
376
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
377
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
378
|
+
* @throws Compile error
|
|
379
|
+
* @danger You must configure the generic argument `T`
|
|
390
380
|
*/
|
|
391
381
|
export declare function createAssertParse(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
392
382
|
/**
|
|
393
383
|
* Creates a reusable {@link assertParse} function.
|
|
394
384
|
*
|
|
385
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
395
386
|
* @template T Expected type of parsed value
|
|
396
387
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
397
388
|
* @returns A reusable `assertParse` function
|
|
398
|
-
*
|
|
399
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
400
389
|
*/
|
|
401
390
|
export declare function createAssertParse<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: string) => Primitive<T>;
|
|
402
391
|
/**
|
|
403
392
|
* Creates a reusable {@link validateParse} function.
|
|
404
393
|
*
|
|
405
|
-
* @danger You must configure the generic argument `T`
|
|
406
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
407
|
-
* @throws compile error
|
|
408
|
-
*
|
|
409
394
|
* @author Jeongho Nam - https://github.com/samchon
|
|
395
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
396
|
+
* @throws Compile error
|
|
397
|
+
* @danger You must configure the generic argument `T`
|
|
410
398
|
*/
|
|
411
399
|
export declare function createValidateParse(): never;
|
|
412
400
|
/**
|
|
413
401
|
* Creates a reusable {@link validateParse} function.
|
|
414
402
|
*
|
|
403
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
415
404
|
* @template T Expected type of parsed value
|
|
416
405
|
* @returns A reusable `validateParse` function
|
|
417
|
-
*
|
|
418
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
419
406
|
*/
|
|
420
407
|
export declare function createValidateParse<T>(): (input: string) => IValidation<Primitive<T>>;
|
|
421
408
|
/**
|
|
422
409
|
* Creates a reusable {@link stringify} function.
|
|
423
410
|
*
|
|
424
|
-
* @danger You must configure the generic argument `T`
|
|
425
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
426
|
-
* @throws compile error
|
|
427
|
-
*
|
|
428
411
|
* @author Jeongho Nam - https://github.com/samchon
|
|
412
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
413
|
+
* @throws Compile error
|
|
414
|
+
* @danger You must configure the generic argument `T`
|
|
429
415
|
*/
|
|
430
416
|
export declare function createStringify(): never;
|
|
431
417
|
/**
|
|
432
418
|
* Creates a reusable {@link stringify} function.
|
|
433
419
|
*
|
|
420
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
434
421
|
* @template T Type of the input value
|
|
435
422
|
* @returns A reusable `stringify` function
|
|
436
|
-
*
|
|
437
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
438
423
|
*/
|
|
439
424
|
export declare function createStringify<T>(): (input: T) => string;
|
|
440
425
|
/**
|
|
441
426
|
* Creates a reusable {@link assertStringify} function.
|
|
442
427
|
*
|
|
443
|
-
* @
|
|
428
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
444
429
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
445
430
|
* @returns Nothing until you configure the generic argument `T`
|
|
446
|
-
* @throws
|
|
447
|
-
*
|
|
448
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
431
|
+
* @throws Compile error
|
|
432
|
+
* @danger You must configure the generic argument `T`
|
|
449
433
|
*/
|
|
450
434
|
export declare function createAssertStringify(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
451
435
|
/**
|
|
452
436
|
* Creates a reusable {@link assertStringify} function.
|
|
453
437
|
*
|
|
438
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
454
439
|
* @template T Type of the input value
|
|
455
440
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
456
441
|
* @returns A reusable `assertStringify` function
|
|
457
|
-
*
|
|
458
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
459
442
|
*/
|
|
460
443
|
export declare function createAssertStringify<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown) => string;
|
|
461
444
|
/**
|
|
462
445
|
* Creates a reusable {@link isStringify} function.
|
|
463
446
|
*
|
|
464
|
-
* @danger You must configure the generic argument `T`
|
|
465
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
466
|
-
* @throws compile error
|
|
467
|
-
*
|
|
468
447
|
* @author Jeongho Nam - https://github.com/samchon
|
|
448
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
449
|
+
* @throws Compile error
|
|
450
|
+
* @danger You must configure the generic argument `T`
|
|
469
451
|
*/
|
|
470
452
|
export declare function createIsStringify(): never;
|
|
471
453
|
/**
|
|
472
454
|
* Creates a reusable {@link isStringify} function.
|
|
473
455
|
*
|
|
456
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
474
457
|
* @template T Type of the input value
|
|
475
458
|
* @returns A reusable `isStringify` function
|
|
476
|
-
*
|
|
477
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
478
459
|
*/
|
|
479
460
|
export declare function createIsStringify<T>(): (input: unknown) => string | null;
|
|
480
461
|
/**
|
|
481
462
|
* Creates a reusable {@link validateStringify} function.
|
|
482
463
|
*
|
|
483
|
-
* @danger You must configure the generic argument `T`
|
|
484
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
485
|
-
* @throws compile error
|
|
486
|
-
*
|
|
487
464
|
* @author Jeongho Nam - https://github.com/samchon
|
|
465
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
466
|
+
* @throws Compile error
|
|
467
|
+
* @danger You must configure the generic argument `T`
|
|
488
468
|
*/
|
|
489
469
|
export declare function createValidateStringify(): never;
|
|
490
470
|
/**
|
|
491
471
|
* Creates a reusable {@link validateStringify} function.
|
|
492
472
|
*
|
|
473
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
493
474
|
* @template T Type of the input value
|
|
494
475
|
* @returns A reusable `validateStringify` function
|
|
495
|
-
|
|
496
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
497
476
|
*/
|
|
498
477
|
export declare function createValidateStringify<T>(): (input: unknown) => IValidation<string>;
|