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/src/misc.ts
CHANGED
|
@@ -26,10 +26,9 @@ import { TypeGuardError } from "./TypeGuardError";
|
|
|
26
26
|
* literals<"A" | "B" | 1>; // ["A", "B", 1]
|
|
27
27
|
* ```
|
|
28
28
|
*
|
|
29
|
-
* @template T Union literal type
|
|
30
|
-
* @return Array of union literal type's members
|
|
31
|
-
*
|
|
32
29
|
* @author Jeongho Nam - https://github.com/samchon
|
|
30
|
+
* @template T Union literal type
|
|
31
|
+
* @returns Array of union literal type's members
|
|
33
32
|
*/
|
|
34
33
|
export function literals(): never;
|
|
35
34
|
|
|
@@ -42,16 +41,13 @@ export function literals(): never;
|
|
|
42
41
|
* literals<"A" | "B" | 1>; // ["A", "B", 1]
|
|
43
42
|
* ```
|
|
44
43
|
*
|
|
45
|
-
* @template T Union literal type
|
|
46
|
-
* @return Array of union literal type's members
|
|
47
|
-
*
|
|
48
44
|
* @author Jeongho Nam - https://github.com/samchon
|
|
45
|
+
* @template T Union literal type
|
|
46
|
+
* @returns Array of union literal type's members
|
|
49
47
|
*/
|
|
50
48
|
export function literals<T extends Atomic.Type | null>(): T[];
|
|
51
49
|
|
|
52
|
-
/**
|
|
53
|
-
* @internal
|
|
54
|
-
*/
|
|
50
|
+
/** @internal */
|
|
55
51
|
export function literals(): never {
|
|
56
52
|
NoTransformConfigurationError("misc.literals");
|
|
57
53
|
}
|
|
@@ -62,26 +58,23 @@ export function literals(): never {
|
|
|
62
58
|
/**
|
|
63
59
|
* Clone data.
|
|
64
60
|
*
|
|
65
|
-
* Clones an instance following type `T`. If the target
|
|
66
|
-
* variable contains a class instance having methods, those methods would
|
|
67
|
-
* cloned.
|
|
61
|
+
* Clones an instance following type `T`. If the target _input_ value or its
|
|
62
|
+
* member variable contains a class instance having methods, those methods would
|
|
63
|
+
* not be cloned.
|
|
68
64
|
*
|
|
69
|
-
* For reference, this `typia.misc.clone()` function does not validate the input
|
|
70
|
-
* type. It just believes that the input value is following the type `T`.
|
|
71
|
-
* if you can't ensure the input value type, it would be better to
|
|
72
|
-
* {@link assertClone} function instead.
|
|
65
|
+
* For reference, this `typia.misc.clone()` function does not validate the input
|
|
66
|
+
* value type. It just believes that the input value is following the type `T`.
|
|
67
|
+
* Therefore, if you can't ensure the input value type, it would be better to
|
|
68
|
+
* call {@link assertClone} function instead.
|
|
73
69
|
*
|
|
70
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
74
71
|
* @template T Type of the input value
|
|
75
72
|
* @param input A value to be cloned
|
|
76
|
-
* @
|
|
77
|
-
*
|
|
78
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
73
|
+
* @returns Cloned data
|
|
79
74
|
*/
|
|
80
75
|
export function clone<T>(input: T): Resolved<T>;
|
|
81
76
|
|
|
82
|
-
/**
|
|
83
|
-
* @internal
|
|
84
|
-
*/
|
|
77
|
+
/** @internal */
|
|
85
78
|
export function clone(): never {
|
|
86
79
|
NoTransformConfigurationError("misc.clone");
|
|
87
80
|
}
|
|
@@ -89,20 +82,20 @@ export function clone(): never {
|
|
|
89
82
|
/**
|
|
90
83
|
* Clone data with type assertion.
|
|
91
84
|
*
|
|
92
|
-
* Clones an instance following type `T`, with type assertion. If the target
|
|
93
|
-
* value or its member variable contains a class instance having
|
|
94
|
-
* methods would not be cloned.
|
|
85
|
+
* Clones an instance following type `T`, with type assertion. If the target
|
|
86
|
+
* `input` value or its member variable contains a class instance having
|
|
87
|
+
* methods, those methods would not be cloned.
|
|
95
88
|
*
|
|
96
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
97
|
-
* {@link TypeGuardError} or custom error generated by
|
|
98
|
-
* there's no problem on the `input` value, cloned data would be
|
|
89
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
90
|
+
* throws an {@link TypeGuardError} or custom error generated by _errorFactory_.
|
|
91
|
+
* Otherwise, there's no problem on the `input` value, cloned data would be
|
|
92
|
+
* returned.
|
|
99
93
|
*
|
|
94
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
100
95
|
* @template T Type of the input value
|
|
101
96
|
* @param input A value to be cloned
|
|
102
97
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
103
|
-
* @
|
|
104
|
-
*
|
|
105
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
98
|
+
* @returns Cloned data
|
|
106
99
|
*/
|
|
107
100
|
export function assertClone<T>(
|
|
108
101
|
input: T,
|
|
@@ -112,29 +105,27 @@ export function assertClone<T>(
|
|
|
112
105
|
/**
|
|
113
106
|
* Clone data with type assertion.
|
|
114
107
|
*
|
|
115
|
-
* Clones an instance following type `T`, with type assertion. If the target
|
|
116
|
-
* value or its member variable contains a class instance having
|
|
117
|
-
* methods would not be cloned.
|
|
108
|
+
* Clones an instance following type `T`, with type assertion. If the target
|
|
109
|
+
* `input` value or its member variable contains a class instance having
|
|
110
|
+
* methods, those methods would not be cloned.
|
|
118
111
|
*
|
|
119
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
120
|
-
* {@link TypeGuardError} or custom error generated by
|
|
121
|
-
* there's no problem on the `input` value, cloned data would be
|
|
112
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
113
|
+
* throws an {@link TypeGuardError} or custom error generated by _errorFactory_.
|
|
114
|
+
* Otherwise, there's no problem on the `input` value, cloned data would be
|
|
115
|
+
* returned.
|
|
122
116
|
*
|
|
117
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
123
118
|
* @template T Type of the input value
|
|
124
119
|
* @param input A value to be cloned
|
|
125
120
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
126
|
-
* @
|
|
127
|
-
*
|
|
128
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
121
|
+
* @returns Cloned data
|
|
129
122
|
*/
|
|
130
123
|
export function assertClone<T>(
|
|
131
124
|
input: unknown,
|
|
132
125
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
133
126
|
): Resolved<T>;
|
|
134
127
|
|
|
135
|
-
/**
|
|
136
|
-
* @internal
|
|
137
|
-
*/
|
|
128
|
+
/** @internal */
|
|
138
129
|
export function assertClone(): never {
|
|
139
130
|
NoTransformConfigurationError("misc.assertClone");
|
|
140
131
|
}
|
|
@@ -142,44 +133,40 @@ export function assertClone(): never {
|
|
|
142
133
|
/**
|
|
143
134
|
* Clone data with type checking.
|
|
144
135
|
*
|
|
145
|
-
* Clones an instance following type `T`, with type checking. If the target
|
|
146
|
-
* value or its member variable contains a class instance having
|
|
147
|
-
* methods would not be cloned.
|
|
136
|
+
* Clones an instance following type `T`, with type checking. If the target
|
|
137
|
+
* `input` value or its member variable contains a class instance having
|
|
138
|
+
* methods, those methods would not be cloned.
|
|
148
139
|
*
|
|
149
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
150
|
-
* `null` value instead. Otherwise, there's no problem on the `input`
|
|
151
|
-
* data would be returned.
|
|
140
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
141
|
+
* returns `null` value instead. Otherwise, there's no problem on the `input`
|
|
142
|
+
* value, cloned data would be returned.
|
|
152
143
|
*
|
|
144
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
153
145
|
* @template T Type of the input value
|
|
154
146
|
* @param input A value to be cloned
|
|
155
|
-
* @
|
|
156
|
-
*
|
|
157
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
147
|
+
* @returns Cloned data when exact type, otherwise null
|
|
158
148
|
*/
|
|
159
149
|
export function isClone<T>(input: T): Resolved<T> | null;
|
|
160
150
|
|
|
161
151
|
/**
|
|
162
152
|
* Clone data with type checking.
|
|
163
153
|
*
|
|
164
|
-
* Clones an instance following type `T`, with type checking. If the target
|
|
165
|
-
* value or its member variable contains a class instance having
|
|
166
|
-
* methods would not be cloned.
|
|
154
|
+
* Clones an instance following type `T`, with type checking. If the target
|
|
155
|
+
* `input` value or its member variable contains a class instance having
|
|
156
|
+
* methods, those methods would not be cloned.
|
|
167
157
|
*
|
|
168
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
169
|
-
* `null` value instead. Otherwise, there's no problem on the `input`
|
|
170
|
-
* data would be returned.
|
|
158
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
159
|
+
* returns `null` value instead. Otherwise, there's no problem on the `input`
|
|
160
|
+
* value, cloned data would be returned.
|
|
171
161
|
*
|
|
162
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
172
163
|
* @template T Type of the input value
|
|
173
164
|
* @param input A value to be cloned
|
|
174
|
-
* @
|
|
175
|
-
*
|
|
176
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
165
|
+
* @returns Cloned data when exact type, otherwise null
|
|
177
166
|
*/
|
|
178
167
|
export function isClone<T>(input: unknown): Resolved<T> | null;
|
|
179
168
|
|
|
180
|
-
/**
|
|
181
|
-
* @internal
|
|
182
|
-
*/
|
|
169
|
+
/** @internal */
|
|
183
170
|
export function isClone(): never {
|
|
184
171
|
NoTransformConfigurationError("misc.isClone");
|
|
185
172
|
}
|
|
@@ -187,14 +174,14 @@ export function isClone(): never {
|
|
|
187
174
|
/**
|
|
188
175
|
* Clone data with detailed type validation.
|
|
189
176
|
*
|
|
190
|
-
* Clones an instance following type `T`, with detailed type validation. If the
|
|
191
|
-
* `input` value or its member variable contains a class instance having
|
|
192
|
-
* those methods would not be cloned.
|
|
177
|
+
* Clones an instance following type `T`, with detailed type validation. If the
|
|
178
|
+
* target `input` value or its member variable contains a class instance having
|
|
179
|
+
* methods, those methods would not be cloned.
|
|
193
180
|
*
|
|
194
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
195
|
-
* {@link IValidation.Failure} value. Otherwise, there's no problem on
|
|
196
|
-
* value, cloned data would be stored in `data` property of the
|
|
197
|
-
* {@link IValidation.Success} instance.
|
|
181
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
182
|
+
* returns {@link IValidation.Failure} value. Otherwise, there's no problem on
|
|
183
|
+
* the `input` value, cloned data would be stored in `data` property of the
|
|
184
|
+
* output {@link IValidation.Success} instance.
|
|
198
185
|
*
|
|
199
186
|
* @template T Type of the input value
|
|
200
187
|
* @param input A value to be cloned
|
|
@@ -205,14 +192,14 @@ export function validateClone<T>(input: T): IValidation<Resolved<T>>;
|
|
|
205
192
|
/**
|
|
206
193
|
* Clone data with detailed type validation.
|
|
207
194
|
*
|
|
208
|
-
* Clones an instance following type `T`, with detailed type validation. If the
|
|
209
|
-
* `input` value or its member variable contains a class instance having
|
|
210
|
-
* those methods would not be cloned.
|
|
195
|
+
* Clones an instance following type `T`, with detailed type validation. If the
|
|
196
|
+
* target `input` value or its member variable contains a class instance having
|
|
197
|
+
* methods, those methods would not be cloned.
|
|
211
198
|
*
|
|
212
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
213
|
-
* {@link IValidation.Failure} value. Otherwise, there's no problem on
|
|
214
|
-
* value, cloned data would be stored in `data` property of the
|
|
215
|
-
* {@link IValidation.Success} instance.
|
|
199
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
200
|
+
* returns {@link IValidation.Failure} value. Otherwise, there's no problem on
|
|
201
|
+
* the `input` value, cloned data would be stored in `data` property of the
|
|
202
|
+
* output {@link IValidation.Success} instance.
|
|
216
203
|
*
|
|
217
204
|
* @template T Type of the input value
|
|
218
205
|
* @param input A value to be cloned
|
|
@@ -220,9 +207,7 @@ export function validateClone<T>(input: T): IValidation<Resolved<T>>;
|
|
|
220
207
|
*/
|
|
221
208
|
export function validateClone<T>(input: unknown): IValidation<Resolved<T>>;
|
|
222
209
|
|
|
223
|
-
/**
|
|
224
|
-
* @internal
|
|
225
|
-
*/
|
|
210
|
+
/** @internal */
|
|
226
211
|
export function validateClone(): never {
|
|
227
212
|
NoTransformConfigurationError("misc.validateClone");
|
|
228
213
|
}
|
|
@@ -233,29 +218,27 @@ export function validateClone(): never {
|
|
|
233
218
|
/**
|
|
234
219
|
* Prune, erase superfluous properties.
|
|
235
220
|
*
|
|
236
|
-
* Remove all superfluous properties from the `input` object, even including
|
|
237
|
-
* objects. Note that, as all superfluous properties would be deleted,
|
|
238
|
-
* read those superfluous properties after calling this `prune()`
|
|
221
|
+
* Remove all superfluous properties from the `input` object, even including
|
|
222
|
+
* nested objects. Note that, as all superfluous properties would be deleted,
|
|
223
|
+
* you never can read those superfluous properties after calling this `prune()`
|
|
224
|
+
* function.
|
|
239
225
|
*
|
|
240
|
-
* For reference, this `typia.misc.prune()` function does not validate the input
|
|
241
|
-
* type. It just believes that the input value is following the type `T`.
|
|
242
|
-
* if you can't ensure the input value type, it would better to call
|
|
243
|
-
* functions instead.
|
|
226
|
+
* For reference, this `typia.misc.prune()` function does not validate the input
|
|
227
|
+
* value type. It just believes that the input value is following the type `T`.
|
|
228
|
+
* Therefore, if you can't ensure the input value type, it would better to call
|
|
229
|
+
* one of below functions instead.
|
|
244
230
|
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
231
|
+
* - {@link assertPrune}
|
|
232
|
+
* - {@link isPrune}
|
|
233
|
+
* - {@link validatePrune}
|
|
248
234
|
*
|
|
235
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
249
236
|
* @template T Type of the input value
|
|
250
237
|
* @param input Target instance to prune
|
|
251
|
-
*
|
|
252
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
253
238
|
*/
|
|
254
239
|
export function prune<T extends object>(input: T): void;
|
|
255
240
|
|
|
256
|
-
/**
|
|
257
|
-
* @internal
|
|
258
|
-
*/
|
|
241
|
+
/** @internal */
|
|
259
242
|
export function prune(): never {
|
|
260
243
|
NoTransformConfigurationError("misc.prune");
|
|
261
244
|
}
|
|
@@ -264,19 +247,18 @@ export function prune(): never {
|
|
|
264
247
|
* Prune, erase superfluous properties, with type assertion.
|
|
265
248
|
*
|
|
266
249
|
* `typia.misc.assertPrune()` is a combination function of {@link assert} and
|
|
267
|
-
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
268
|
-
* object including nested objects, with type assertion.
|
|
250
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
251
|
+
* `input` object including nested objects, with type assertion.
|
|
269
252
|
*
|
|
270
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
271
|
-
* {@link TypeGuardError} or custom error generated by
|
|
272
|
-
* there's no problem on the `input` value, its all superfluous
|
|
273
|
-
* removed, including nested objects.
|
|
253
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
254
|
+
* throws an {@link TypeGuardError} or custom error generated by _errorFactory_.
|
|
255
|
+
* Otherwise, there's no problem on the `input` value, its all superfluous
|
|
256
|
+
* properties would be removed, including nested objects.
|
|
274
257
|
*
|
|
258
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
275
259
|
* @template T Type of the input value
|
|
276
260
|
* @param input Target instance to assert and prune
|
|
277
261
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
278
|
-
*
|
|
279
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
280
262
|
*/
|
|
281
263
|
export function assertPrune<T>(
|
|
282
264
|
input: T,
|
|
@@ -287,28 +269,25 @@ export function assertPrune<T>(
|
|
|
287
269
|
* Prune, erase superfluous properties, with type assertion.
|
|
288
270
|
*
|
|
289
271
|
* `typia.misc.assertPrune()` is a combination function of {@link assert} and
|
|
290
|
-
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
291
|
-
* object including nested objects, with type assertion.
|
|
272
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
273
|
+
* `input` object including nested objects, with type assertion.
|
|
292
274
|
*
|
|
293
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
294
|
-
* {@link TypeGuardError} or custom error generated by
|
|
295
|
-
* no problem on the `input` value, its all superfluous
|
|
296
|
-
* including nested objects.
|
|
275
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
276
|
+
* throws an {@link TypeGuardError} or custom error generated by _errorFactory_.
|
|
277
|
+
* Otherwise, there's no problem on the `input` value, its all superfluous
|
|
278
|
+
* properties would be removed, including nested objects.
|
|
297
279
|
*
|
|
280
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
298
281
|
* @template T Type of the input value
|
|
299
282
|
* @param input Target instance to assert and prune
|
|
300
283
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
301
|
-
*
|
|
302
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
303
284
|
*/
|
|
304
285
|
export function assertPrune<T>(
|
|
305
286
|
input: unknown,
|
|
306
287
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
307
288
|
): T;
|
|
308
289
|
|
|
309
|
-
/**
|
|
310
|
-
* @internal
|
|
311
|
-
*/
|
|
290
|
+
/** @internal */
|
|
312
291
|
export function assertPrune(): unknown {
|
|
313
292
|
NoTransformConfigurationError("misc.assertPrune");
|
|
314
293
|
}
|
|
@@ -317,18 +296,18 @@ export function assertPrune(): unknown {
|
|
|
317
296
|
* Prune, erase superfluous properties, with type checking.
|
|
318
297
|
*
|
|
319
298
|
* `typia.misc.isPrune()` is a combination function of {@link is} and
|
|
320
|
-
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
321
|
-
* object including nested objects, with type checking.
|
|
299
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
300
|
+
* `input` object including nested objects, with type checking.
|
|
322
301
|
*
|
|
323
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
324
|
-
* `false` value. Otherwise, there's no problem on the `input` value, it
|
|
325
|
-
* `true` after removing all superfluous properties, including nested
|
|
302
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
303
|
+
* returns `false` value. Otherwise, there's no problem on the `input` value, it
|
|
304
|
+
* returns `true` after removing all superfluous properties, including nested
|
|
305
|
+
* objects.
|
|
326
306
|
*
|
|
307
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
327
308
|
* @template T Type of the input value
|
|
328
309
|
* @param input Target instance to check and prune
|
|
329
310
|
* @returns Whether the parametric value is following the type `T` or not
|
|
330
|
-
*
|
|
331
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
332
311
|
*/
|
|
333
312
|
export function isPrune<T>(input: T): input is T;
|
|
334
313
|
|
|
@@ -336,24 +315,22 @@ export function isPrune<T>(input: T): input is T;
|
|
|
336
315
|
* Prune, erase superfluous properties, with type checking.
|
|
337
316
|
*
|
|
338
317
|
* `typia.misc.isPrune()` is a combination function of {@link is} and
|
|
339
|
-
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
340
|
-
* object including nested objects, with type checking.
|
|
318
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
319
|
+
* `input` object including nested objects, with type checking.
|
|
341
320
|
*
|
|
342
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
343
|
-
* `false` value. Otherwise, there's no problem on the `input` value, it
|
|
344
|
-
* `true` after removing all superfluous properties, including nested
|
|
321
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
322
|
+
* returns `false` value. Otherwise, there's no problem on the `input` value, it
|
|
323
|
+
* returns `true` after removing all superfluous properties, including nested
|
|
324
|
+
* objects.
|
|
345
325
|
*
|
|
326
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
346
327
|
* @template T Type of the input value
|
|
347
328
|
* @param input Target instance to check and prune
|
|
348
329
|
* @returns Whether the parametric value is following the type `T` or not
|
|
349
|
-
*
|
|
350
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
351
330
|
*/
|
|
352
331
|
export function isPrune<T>(input: unknown): input is T;
|
|
353
332
|
|
|
354
|
-
/**
|
|
355
|
-
* @internal
|
|
356
|
-
*/
|
|
333
|
+
/** @internal */
|
|
357
334
|
export function isPrune(): never {
|
|
358
335
|
NoTransformConfigurationError("misc.isPrune");
|
|
359
336
|
}
|
|
@@ -362,19 +339,19 @@ export function isPrune(): never {
|
|
|
362
339
|
* Prune, erase superfluous properties, with type validation.
|
|
363
340
|
*
|
|
364
341
|
* `typia.misc.validatePrune()` is a combination function of {@link validate} and
|
|
365
|
-
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
366
|
-
* object including nested objects, with type validation.
|
|
342
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
343
|
+
* `input` object including nested objects, with type validation.
|
|
367
344
|
*
|
|
368
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
369
|
-
* {@link IValidation.IFailure} value with detailed error reasons.
|
|
370
|
-
* no problem on the `input` value, it returns
|
|
371
|
-
* removing all superfluous properties,
|
|
345
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
346
|
+
* returns {@link IValidation.IFailure} value with detailed error reasons.
|
|
347
|
+
* Otherwise, there's no problem on the `input` value, it returns
|
|
348
|
+
* {@link IValidation.ISuccess} value after removing all superfluous properties,
|
|
349
|
+
* including nested objects.
|
|
372
350
|
*
|
|
351
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
373
352
|
* @template T Type of the input value
|
|
374
353
|
* @param input Target instance to validate and prune
|
|
375
354
|
* @returns Validation result
|
|
376
|
-
*
|
|
377
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
378
355
|
*/
|
|
379
356
|
export function validatePrune<T>(input: T): IValidation<T>;
|
|
380
357
|
|
|
@@ -382,25 +359,23 @@ export function validatePrune<T>(input: T): IValidation<T>;
|
|
|
382
359
|
* Prune, erase superfluous properties, with type validation.
|
|
383
360
|
*
|
|
384
361
|
* `typia.misc.validatePrune()` is a combination function of {@link validate} and
|
|
385
|
-
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
386
|
-
* object including nested objects, with type validation.
|
|
362
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
363
|
+
* `input` object including nested objects, with type validation.
|
|
387
364
|
*
|
|
388
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
389
|
-
* {@link IValidation.IFailure} value with detailed error reasons.
|
|
390
|
-
* no problem on the `input` value, it returns
|
|
391
|
-
* removing all superfluous properties,
|
|
365
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
366
|
+
* returns {@link IValidation.IFailure} value with detailed error reasons.
|
|
367
|
+
* Otherwise, there's no problem on the `input` value, it returns
|
|
368
|
+
* {@link IValidation.ISuccess} value after removing all superfluous properties,
|
|
369
|
+
* including nested objects.
|
|
392
370
|
*
|
|
371
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
393
372
|
* @template T Type of the input value
|
|
394
373
|
* @param input Target instance to validate and prune
|
|
395
374
|
* @returns Validation result
|
|
396
|
-
*
|
|
397
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
398
375
|
*/
|
|
399
376
|
export function validatePrune<T>(input: unknown): IValidation<T>;
|
|
400
377
|
|
|
401
|
-
/**
|
|
402
|
-
* @internal
|
|
403
|
-
*/
|
|
378
|
+
/** @internal */
|
|
404
379
|
export function validatePrune<T>(): IValidation<T> {
|
|
405
380
|
NoTransformConfigurationError("misc.validatePrune");
|
|
406
381
|
}
|
|
@@ -411,27 +386,23 @@ export function validatePrune<T>(): IValidation<T> {
|
|
|
411
386
|
/**
|
|
412
387
|
* Creates a reusable {@link clone} function.
|
|
413
388
|
*
|
|
414
|
-
* @danger You must configure the generic argument `T`
|
|
415
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
416
|
-
* @throws compile error
|
|
417
|
-
*
|
|
418
389
|
* @author Jeongho Nam - https://github.com/samchon
|
|
390
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
391
|
+
* @throws Compile error
|
|
392
|
+
* @danger You must configure the generic argument `T`
|
|
419
393
|
*/
|
|
420
394
|
export function createClone(): never;
|
|
421
395
|
|
|
422
396
|
/**
|
|
423
397
|
* Creates a reusable {@link clone} function.
|
|
424
398
|
*
|
|
399
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
425
400
|
* @template T Type of the input value
|
|
426
401
|
* @returns A reusable `clone` function
|
|
427
|
-
*
|
|
428
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
429
402
|
*/
|
|
430
403
|
export function createClone<T>(): (input: T) => Resolved<T>;
|
|
431
404
|
|
|
432
|
-
/**
|
|
433
|
-
* @internal
|
|
434
|
-
*/
|
|
405
|
+
/** @internal */
|
|
435
406
|
export function createClone(): never {
|
|
436
407
|
NoTransformConfigurationError("misc.createClone");
|
|
437
408
|
}
|
|
@@ -439,12 +410,11 @@ export function createClone(): never {
|
|
|
439
410
|
/**
|
|
440
411
|
* Creates a reusable {@link assertClone} function.
|
|
441
412
|
*
|
|
442
|
-
* @
|
|
413
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
443
414
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
444
415
|
* @returns Nothing until you configure the generic argument `T`
|
|
445
|
-
* @throws
|
|
446
|
-
*
|
|
447
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
416
|
+
* @throws Compile error
|
|
417
|
+
* @danger You must configure the generic argument `T`
|
|
448
418
|
*/
|
|
449
419
|
export function createAssertClone(
|
|
450
420
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
@@ -453,19 +423,16 @@ export function createAssertClone(
|
|
|
453
423
|
/**
|
|
454
424
|
* Creates a reusable {@link assertClone} function.
|
|
455
425
|
*
|
|
426
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
456
427
|
* @template T Type of the input value
|
|
457
428
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
458
429
|
* @returns A reusable `clone` function
|
|
459
|
-
*
|
|
460
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
461
430
|
*/
|
|
462
431
|
export function createAssertClone<T>(
|
|
463
432
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
464
433
|
): (input: unknown) => Resolved<T>;
|
|
465
434
|
|
|
466
|
-
/**
|
|
467
|
-
* @internal
|
|
468
|
-
*/
|
|
435
|
+
/** @internal */
|
|
469
436
|
export function createAssertClone(): never {
|
|
470
437
|
NoTransformConfigurationError("misc.createAssertClone");
|
|
471
438
|
}
|
|
@@ -473,27 +440,23 @@ export function createAssertClone(): never {
|
|
|
473
440
|
/**
|
|
474
441
|
* Creates a reusable {@link isClone} function.
|
|
475
442
|
*
|
|
476
|
-
* @danger You must configure the generic argument `T`
|
|
477
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
478
|
-
* @throws compile error
|
|
479
|
-
*
|
|
480
443
|
* @author Jeongho Nam - https://github.com/samchon
|
|
444
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
445
|
+
* @throws Compile error
|
|
446
|
+
* @danger You must configure the generic argument `T`
|
|
481
447
|
*/
|
|
482
448
|
export function createIsClone(): never;
|
|
483
449
|
|
|
484
450
|
/**
|
|
485
451
|
* Creates a reusable {@link isClone} function.
|
|
486
452
|
*
|
|
453
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
487
454
|
* @template T Type of the input value
|
|
488
455
|
* @returns A reusable `clone` function
|
|
489
|
-
*
|
|
490
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
491
456
|
*/
|
|
492
457
|
export function createIsClone<T>(): (input: unknown) => Resolved<T> | null;
|
|
493
458
|
|
|
494
|
-
/**
|
|
495
|
-
* @internal
|
|
496
|
-
*/
|
|
459
|
+
/** @internal */
|
|
497
460
|
export function createIsClone(): never {
|
|
498
461
|
NoTransformConfigurationError("misc.createIsClone");
|
|
499
462
|
}
|
|
@@ -501,29 +464,25 @@ export function createIsClone(): never {
|
|
|
501
464
|
/**
|
|
502
465
|
* Creates a reusable {@link validateClone} function.
|
|
503
466
|
*
|
|
504
|
-
* @danger You must configure the generic argument `T`
|
|
505
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
506
|
-
* @throws compile error
|
|
507
|
-
*
|
|
508
467
|
* @author Jeongho Nam - https://github.com/samchon
|
|
468
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
469
|
+
* @throws Compile error
|
|
470
|
+
* @danger You must configure the generic argument `T`
|
|
509
471
|
*/
|
|
510
472
|
export function createValidateClone(): never;
|
|
511
473
|
|
|
512
474
|
/**
|
|
513
475
|
* Creates a reusable {@link validateClone} function.
|
|
514
476
|
*
|
|
477
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
515
478
|
* @template T Type of the input value
|
|
516
479
|
* @returns A reusable `clone` function
|
|
517
|
-
*
|
|
518
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
519
480
|
*/
|
|
520
481
|
export function createValidateClone<T>(): (
|
|
521
482
|
input: unknown,
|
|
522
483
|
) => IValidation<Resolved<T>>;
|
|
523
484
|
|
|
524
|
-
/**
|
|
525
|
-
* @internal
|
|
526
|
-
*/
|
|
485
|
+
/** @internal */
|
|
527
486
|
export function createValidateClone(): never {
|
|
528
487
|
NoTransformConfigurationError("misc.createValidateClone");
|
|
529
488
|
}
|
|
@@ -531,27 +490,23 @@ export function createValidateClone(): never {
|
|
|
531
490
|
/**
|
|
532
491
|
* Creates a reusable {@link prune} function.
|
|
533
492
|
*
|
|
534
|
-
* @danger You must configure the generic argument `T`
|
|
535
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
536
|
-
* @throws compile error
|
|
537
|
-
*
|
|
538
493
|
* @author Jeongho Nam - https://github.com/samchon
|
|
494
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
495
|
+
* @throws Compile error
|
|
496
|
+
* @danger You must configure the generic argument `T`
|
|
539
497
|
*/
|
|
540
498
|
export function createPrune(): never;
|
|
541
499
|
|
|
542
500
|
/**
|
|
543
501
|
* Creates a reusable {@link prune} function.
|
|
544
502
|
*
|
|
503
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
545
504
|
* @template T Type of the input value
|
|
546
505
|
* @returns A reusable `prune` function
|
|
547
|
-
*
|
|
548
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
549
506
|
*/
|
|
550
507
|
export function createPrune<T extends object>(): (input: T) => void;
|
|
551
508
|
|
|
552
|
-
/**
|
|
553
|
-
* @internal
|
|
554
|
-
*/
|
|
509
|
+
/** @internal */
|
|
555
510
|
export function createPrune<T extends object>(): (input: T) => void {
|
|
556
511
|
NoTransformConfigurationError("misc.createPrune");
|
|
557
512
|
}
|
|
@@ -559,12 +514,11 @@ export function createPrune<T extends object>(): (input: T) => void {
|
|
|
559
514
|
/**
|
|
560
515
|
* Creates a reusable {@link assertPrune} function.
|
|
561
516
|
*
|
|
562
|
-
* @
|
|
517
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
563
518
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
564
519
|
* @returns Nothing until you configure the generic argument `T`
|
|
565
|
-
* @throws
|
|
566
|
-
*
|
|
567
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
520
|
+
* @throws Compile error
|
|
521
|
+
* @danger You must configure the generic argument `T`
|
|
568
522
|
*/
|
|
569
523
|
export function createAssertPrune(
|
|
570
524
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
@@ -573,19 +527,16 @@ export function createAssertPrune(
|
|
|
573
527
|
/**
|
|
574
528
|
* Creates a reusable {@link assertPrune} function.
|
|
575
529
|
*
|
|
530
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
576
531
|
* @template T Type of the input value
|
|
577
532
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
578
533
|
* @returns A reusable `isPrune` function
|
|
579
|
-
*
|
|
580
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
581
534
|
*/
|
|
582
535
|
export function createAssertPrune<T extends object>(
|
|
583
536
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
584
537
|
): (input: T) => T;
|
|
585
538
|
|
|
586
|
-
/**
|
|
587
|
-
* @internal
|
|
588
|
-
*/
|
|
539
|
+
/** @internal */
|
|
589
540
|
export function createAssertPrune<T extends object>(): (input: T) => T {
|
|
590
541
|
NoTransformConfigurationError("misc.createAssertPrune");
|
|
591
542
|
}
|
|
@@ -593,27 +544,23 @@ export function createAssertPrune<T extends object>(): (input: T) => T {
|
|
|
593
544
|
/**
|
|
594
545
|
* Creates a reusable {@link isPrune} function.
|
|
595
546
|
*
|
|
596
|
-
* @danger You must configure the generic argument `T`
|
|
597
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
598
|
-
* @throws compile error
|
|
599
|
-
*
|
|
600
547
|
* @author Jeongho Nam - https://github.com/samchon
|
|
548
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
549
|
+
* @throws Compile error
|
|
550
|
+
* @danger You must configure the generic argument `T`
|
|
601
551
|
*/
|
|
602
552
|
export function createIsPrune(): never;
|
|
603
553
|
|
|
604
554
|
/**
|
|
605
555
|
* Creates a reusable {@link isPrune} function.
|
|
606
556
|
*
|
|
557
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
607
558
|
* @template T Type of the input value
|
|
608
559
|
* @returns A reusable `isPrune` function
|
|
609
|
-
*
|
|
610
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
611
560
|
*/
|
|
612
561
|
export function createIsPrune<T extends object>(): (input: T) => input is T;
|
|
613
562
|
|
|
614
|
-
/**
|
|
615
|
-
* @internal
|
|
616
|
-
*/
|
|
563
|
+
/** @internal */
|
|
617
564
|
export function createIsPrune<T extends object>(): (input: T) => input is T {
|
|
618
565
|
NoTransformConfigurationError("misc.createIsPrune");
|
|
619
566
|
}
|
|
@@ -621,29 +568,25 @@ export function createIsPrune<T extends object>(): (input: T) => input is T {
|
|
|
621
568
|
/**
|
|
622
569
|
* Creates a reusable {@link validatePrune} function.
|
|
623
570
|
*
|
|
624
|
-
* @danger You must configure the generic argument `T`
|
|
625
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
626
|
-
* @throws compile error
|
|
627
|
-
*
|
|
628
571
|
* @author Jeongho Nam - https://github.com/samchon
|
|
572
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
573
|
+
* @throws Compile error
|
|
574
|
+
* @danger You must configure the generic argument `T`
|
|
629
575
|
*/
|
|
630
576
|
export function createValidatePrune(): never;
|
|
631
577
|
|
|
632
578
|
/**
|
|
633
579
|
* Creates a reusable {@link validatePrune} function.
|
|
634
580
|
*
|
|
581
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
635
582
|
* @template T Type of the input value
|
|
636
583
|
* @returns A reusable `validatePrune` function
|
|
637
|
-
*
|
|
638
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
639
584
|
*/
|
|
640
585
|
export function createValidatePrune<T extends object>(): (
|
|
641
586
|
input: T,
|
|
642
587
|
) => IValidation<T>;
|
|
643
588
|
|
|
644
|
-
/**
|
|
645
|
-
* @internal
|
|
646
|
-
*/
|
|
589
|
+
/** @internal */
|
|
647
590
|
export function createValidatePrune<T extends object>(): (
|
|
648
591
|
input: T,
|
|
649
592
|
) => IValidation<T> {
|