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/misc.d.ts
CHANGED
|
@@ -13,10 +13,9 @@ import { TypeGuardError } from "./TypeGuardError";
|
|
|
13
13
|
* literals<"A" | "B" | 1>; // ["A", "B", 1]
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
|
-
* @template T Union literal type
|
|
17
|
-
* @return Array of union literal type's members
|
|
18
|
-
*
|
|
19
16
|
* @author Jeongho Nam - https://github.com/samchon
|
|
17
|
+
* @template T Union literal type
|
|
18
|
+
* @returns Array of union literal type's members
|
|
20
19
|
*/
|
|
21
20
|
export declare function literals(): never;
|
|
22
21
|
/**
|
|
@@ -28,116 +27,112 @@ export declare function literals(): never;
|
|
|
28
27
|
* literals<"A" | "B" | 1>; // ["A", "B", 1]
|
|
29
28
|
* ```
|
|
30
29
|
*
|
|
31
|
-
* @template T Union literal type
|
|
32
|
-
* @return Array of union literal type's members
|
|
33
|
-
*
|
|
34
30
|
* @author Jeongho Nam - https://github.com/samchon
|
|
31
|
+
* @template T Union literal type
|
|
32
|
+
* @returns Array of union literal type's members
|
|
35
33
|
*/
|
|
36
34
|
export declare function literals<T extends Atomic.Type | null>(): T[];
|
|
37
35
|
/**
|
|
38
36
|
* Clone data.
|
|
39
37
|
*
|
|
40
|
-
* Clones an instance following type `T`. If the target
|
|
41
|
-
* variable contains a class instance having methods, those methods would
|
|
42
|
-
* cloned.
|
|
38
|
+
* Clones an instance following type `T`. If the target _input_ value or its
|
|
39
|
+
* member variable contains a class instance having methods, those methods would
|
|
40
|
+
* not be cloned.
|
|
43
41
|
*
|
|
44
|
-
* For reference, this `typia.misc.clone()` function does not validate the input
|
|
45
|
-
* type. It just believes that the input value is following the type `T`.
|
|
46
|
-
* if you can't ensure the input value type, it would be better to
|
|
47
|
-
* {@link assertClone} function instead.
|
|
42
|
+
* For reference, this `typia.misc.clone()` function does not validate the input
|
|
43
|
+
* value type. It just believes that the input value is following the type `T`.
|
|
44
|
+
* Therefore, if you can't ensure the input value type, it would be better to
|
|
45
|
+
* call {@link assertClone} function instead.
|
|
48
46
|
*
|
|
47
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
49
48
|
* @template T Type of the input value
|
|
50
49
|
* @param input A value to be cloned
|
|
51
|
-
* @
|
|
52
|
-
*
|
|
53
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
50
|
+
* @returns Cloned data
|
|
54
51
|
*/
|
|
55
52
|
export declare function clone<T>(input: T): Resolved<T>;
|
|
56
53
|
/**
|
|
57
54
|
* Clone data with type assertion.
|
|
58
55
|
*
|
|
59
|
-
* Clones an instance following type `T`, with type assertion. If the target
|
|
60
|
-
* value or its member variable contains a class instance having
|
|
61
|
-
* methods would not be cloned.
|
|
56
|
+
* Clones an instance following type `T`, with type assertion. If the target
|
|
57
|
+
* `input` value or its member variable contains a class instance having
|
|
58
|
+
* methods, those methods would not be cloned.
|
|
62
59
|
*
|
|
63
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
64
|
-
* {@link TypeGuardError} or custom error generated by
|
|
65
|
-
* there's no problem on the `input` value, cloned data would be
|
|
60
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
61
|
+
* throws an {@link TypeGuardError} or custom error generated by _errorFactory_.
|
|
62
|
+
* Otherwise, there's no problem on the `input` value, cloned data would be
|
|
63
|
+
* returned.
|
|
66
64
|
*
|
|
65
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
67
66
|
* @template T Type of the input value
|
|
68
67
|
* @param input A value to be cloned
|
|
69
68
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
70
|
-
* @
|
|
71
|
-
*
|
|
72
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
69
|
+
* @returns Cloned data
|
|
73
70
|
*/
|
|
74
71
|
export declare function assertClone<T>(input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Resolved<T>;
|
|
75
72
|
/**
|
|
76
73
|
* Clone data with type assertion.
|
|
77
74
|
*
|
|
78
|
-
* Clones an instance following type `T`, with type assertion. If the target
|
|
79
|
-
* value or its member variable contains a class instance having
|
|
80
|
-
* methods would not be cloned.
|
|
75
|
+
* Clones an instance following type `T`, with type assertion. If the target
|
|
76
|
+
* `input` value or its member variable contains a class instance having
|
|
77
|
+
* methods, those methods would not be cloned.
|
|
81
78
|
*
|
|
82
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
83
|
-
* {@link TypeGuardError} or custom error generated by
|
|
84
|
-
* there's no problem on the `input` value, cloned data would be
|
|
79
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
80
|
+
* throws an {@link TypeGuardError} or custom error generated by _errorFactory_.
|
|
81
|
+
* Otherwise, there's no problem on the `input` value, cloned data would be
|
|
82
|
+
* returned.
|
|
85
83
|
*
|
|
84
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
86
85
|
* @template T Type of the input value
|
|
87
86
|
* @param input A value to be cloned
|
|
88
87
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
89
|
-
* @
|
|
90
|
-
*
|
|
91
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
88
|
+
* @returns Cloned data
|
|
92
89
|
*/
|
|
93
90
|
export declare function assertClone<T>(input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Resolved<T>;
|
|
94
91
|
/**
|
|
95
92
|
* Clone data with type checking.
|
|
96
93
|
*
|
|
97
|
-
* Clones an instance following type `T`, with type checking. If the target
|
|
98
|
-
* value or its member variable contains a class instance having
|
|
99
|
-
* methods would not be cloned.
|
|
94
|
+
* Clones an instance following type `T`, with type checking. If the target
|
|
95
|
+
* `input` value or its member variable contains a class instance having
|
|
96
|
+
* methods, those methods would not be cloned.
|
|
100
97
|
*
|
|
101
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
102
|
-
* `null` value instead. Otherwise, there's no problem on the `input`
|
|
103
|
-
* data would be returned.
|
|
98
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
99
|
+
* returns `null` value instead. Otherwise, there's no problem on the `input`
|
|
100
|
+
* value, cloned data would be returned.
|
|
104
101
|
*
|
|
102
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
105
103
|
* @template T Type of the input value
|
|
106
104
|
* @param input A value to be cloned
|
|
107
|
-
* @
|
|
108
|
-
*
|
|
109
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
105
|
+
* @returns Cloned data when exact type, otherwise null
|
|
110
106
|
*/
|
|
111
107
|
export declare function isClone<T>(input: T): Resolved<T> | null;
|
|
112
108
|
/**
|
|
113
109
|
* Clone data with type checking.
|
|
114
110
|
*
|
|
115
|
-
* Clones an instance following type `T`, with type checking. If the target
|
|
116
|
-
* value or its member variable contains a class instance having
|
|
117
|
-
* methods would not be cloned.
|
|
111
|
+
* Clones an instance following type `T`, with type checking. If the target
|
|
112
|
+
* `input` value or its member variable contains a class instance having
|
|
113
|
+
* methods, those methods would not be cloned.
|
|
118
114
|
*
|
|
119
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
120
|
-
* `null` value instead. Otherwise, there's no problem on the `input`
|
|
121
|
-
* data would be returned.
|
|
115
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
116
|
+
* returns `null` value instead. Otherwise, there's no problem on the `input`
|
|
117
|
+
* value, cloned data would be returned.
|
|
122
118
|
*
|
|
119
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
123
120
|
* @template T Type of the input value
|
|
124
121
|
* @param input A value to be cloned
|
|
125
|
-
* @
|
|
126
|
-
*
|
|
127
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
122
|
+
* @returns Cloned data when exact type, otherwise null
|
|
128
123
|
*/
|
|
129
124
|
export declare function isClone<T>(input: unknown): Resolved<T> | null;
|
|
130
125
|
/**
|
|
131
126
|
* Clone data with detailed type validation.
|
|
132
127
|
*
|
|
133
|
-
* Clones an instance following type `T`, with detailed type validation. If the
|
|
134
|
-
* `input` value or its member variable contains a class instance having
|
|
135
|
-
* those methods would not be cloned.
|
|
128
|
+
* Clones an instance following type `T`, with detailed type validation. If the
|
|
129
|
+
* target `input` value or its member variable contains a class instance having
|
|
130
|
+
* methods, those methods would not be cloned.
|
|
136
131
|
*
|
|
137
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
138
|
-
* {@link IValidation.Failure} value. Otherwise, there's no problem on
|
|
139
|
-
* value, cloned data would be stored in `data` property of the
|
|
140
|
-
* {@link IValidation.Success} instance.
|
|
132
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
133
|
+
* returns {@link IValidation.Failure} value. Otherwise, there's no problem on
|
|
134
|
+
* the `input` value, cloned data would be stored in `data` property of the
|
|
135
|
+
* output {@link IValidation.Success} instance.
|
|
141
136
|
*
|
|
142
137
|
* @template T Type of the input value
|
|
143
138
|
* @param input A value to be cloned
|
|
@@ -147,14 +142,14 @@ export declare function validateClone<T>(input: T): IValidation<Resolved<T>>;
|
|
|
147
142
|
/**
|
|
148
143
|
* Clone data with detailed type validation.
|
|
149
144
|
*
|
|
150
|
-
* Clones an instance following type `T`, with detailed type validation. If the
|
|
151
|
-
* `input` value or its member variable contains a class instance having
|
|
152
|
-
* those methods would not be cloned.
|
|
145
|
+
* Clones an instance following type `T`, with detailed type validation. If the
|
|
146
|
+
* target `input` value or its member variable contains a class instance having
|
|
147
|
+
* methods, those methods would not be cloned.
|
|
153
148
|
*
|
|
154
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
155
|
-
* {@link IValidation.Failure} value. Otherwise, there's no problem on
|
|
156
|
-
* value, cloned data would be stored in `data` property of the
|
|
157
|
-
* {@link IValidation.Success} instance.
|
|
149
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
150
|
+
* returns {@link IValidation.Failure} value. Otherwise, there's no problem on
|
|
151
|
+
* the `input` value, cloned data would be stored in `data` property of the
|
|
152
|
+
* output {@link IValidation.Success} instance.
|
|
158
153
|
*
|
|
159
154
|
* @template T Type of the input value
|
|
160
155
|
* @param input A value to be cloned
|
|
@@ -164,290 +159,272 @@ export declare function validateClone<T>(input: unknown): IValidation<Resolved<T
|
|
|
164
159
|
/**
|
|
165
160
|
* Prune, erase superfluous properties.
|
|
166
161
|
*
|
|
167
|
-
* Remove all superfluous properties from the `input` object, even including
|
|
168
|
-
* objects. Note that, as all superfluous properties would be deleted,
|
|
169
|
-
* read those superfluous properties after calling this `prune()`
|
|
162
|
+
* Remove all superfluous properties from the `input` object, even including
|
|
163
|
+
* nested objects. Note that, as all superfluous properties would be deleted,
|
|
164
|
+
* you never can read those superfluous properties after calling this `prune()`
|
|
165
|
+
* function.
|
|
170
166
|
*
|
|
171
|
-
* For reference, this `typia.misc.prune()` function does not validate the input
|
|
172
|
-
* type. It just believes that the input value is following the type `T`.
|
|
173
|
-
* if you can't ensure the input value type, it would better to call
|
|
174
|
-
* functions instead.
|
|
167
|
+
* For reference, this `typia.misc.prune()` function does not validate the input
|
|
168
|
+
* value type. It just believes that the input value is following the type `T`.
|
|
169
|
+
* Therefore, if you can't ensure the input value type, it would better to call
|
|
170
|
+
* one of below functions instead.
|
|
175
171
|
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
172
|
+
* - {@link assertPrune}
|
|
173
|
+
* - {@link isPrune}
|
|
174
|
+
* - {@link validatePrune}
|
|
179
175
|
*
|
|
176
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
180
177
|
* @template T Type of the input value
|
|
181
178
|
* @param input Target instance to prune
|
|
182
|
-
*
|
|
183
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
184
179
|
*/
|
|
185
180
|
export declare function prune<T extends object>(input: T): void;
|
|
186
181
|
/**
|
|
187
182
|
* Prune, erase superfluous properties, with type assertion.
|
|
188
183
|
*
|
|
189
184
|
* `typia.misc.assertPrune()` is a combination function of {@link assert} and
|
|
190
|
-
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
191
|
-
* object including nested objects, with type assertion.
|
|
185
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
186
|
+
* `input` object including nested objects, with type assertion.
|
|
192
187
|
*
|
|
193
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
194
|
-
* {@link TypeGuardError} or custom error generated by
|
|
195
|
-
* there's no problem on the `input` value, its all superfluous
|
|
196
|
-
* removed, including nested objects.
|
|
188
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
189
|
+
* throws an {@link TypeGuardError} or custom error generated by _errorFactory_.
|
|
190
|
+
* Otherwise, there's no problem on the `input` value, its all superfluous
|
|
191
|
+
* properties would be removed, including nested objects.
|
|
197
192
|
*
|
|
193
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
198
194
|
* @template T Type of the input value
|
|
199
195
|
* @param input Target instance to assert and prune
|
|
200
196
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
201
|
-
*
|
|
202
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
203
197
|
*/
|
|
204
198
|
export declare function assertPrune<T>(input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): T;
|
|
205
199
|
/**
|
|
206
200
|
* Prune, erase superfluous properties, with type assertion.
|
|
207
201
|
*
|
|
208
202
|
* `typia.misc.assertPrune()` is a combination function of {@link assert} and
|
|
209
|
-
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
210
|
-
* object including nested objects, with type assertion.
|
|
203
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
204
|
+
* `input` object including nested objects, with type assertion.
|
|
211
205
|
*
|
|
212
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
213
|
-
* {@link TypeGuardError} or custom error generated by
|
|
214
|
-
* no problem on the `input` value, its all superfluous
|
|
215
|
-
* including nested objects.
|
|
206
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
207
|
+
* throws an {@link TypeGuardError} or custom error generated by _errorFactory_.
|
|
208
|
+
* Otherwise, there's no problem on the `input` value, its all superfluous
|
|
209
|
+
* properties would be removed, including nested objects.
|
|
216
210
|
*
|
|
211
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
217
212
|
* @template T Type of the input value
|
|
218
213
|
* @param input Target instance to assert and prune
|
|
219
214
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
220
|
-
*
|
|
221
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
222
215
|
*/
|
|
223
216
|
export declare function assertPrune<T>(input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): T;
|
|
224
217
|
/**
|
|
225
218
|
* Prune, erase superfluous properties, with type checking.
|
|
226
219
|
*
|
|
227
220
|
* `typia.misc.isPrune()` is a combination function of {@link is} and
|
|
228
|
-
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
229
|
-
* object including nested objects, with type checking.
|
|
221
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
222
|
+
* `input` object including nested objects, with type checking.
|
|
230
223
|
*
|
|
231
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
232
|
-
* `false` value. Otherwise, there's no problem on the `input` value, it
|
|
233
|
-
* `true` after removing all superfluous properties, including nested
|
|
224
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
225
|
+
* returns `false` value. Otherwise, there's no problem on the `input` value, it
|
|
226
|
+
* returns `true` after removing all superfluous properties, including nested
|
|
227
|
+
* objects.
|
|
234
228
|
*
|
|
229
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
235
230
|
* @template T Type of the input value
|
|
236
231
|
* @param input Target instance to check and prune
|
|
237
232
|
* @returns Whether the parametric value is following the type `T` or not
|
|
238
|
-
*
|
|
239
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
240
233
|
*/
|
|
241
234
|
export declare function isPrune<T>(input: T): input is T;
|
|
242
235
|
/**
|
|
243
236
|
* Prune, erase superfluous properties, with type checking.
|
|
244
237
|
*
|
|
245
238
|
* `typia.misc.isPrune()` is a combination function of {@link is} and
|
|
246
|
-
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
247
|
-
* object including nested objects, with type checking.
|
|
239
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
240
|
+
* `input` object including nested objects, with type checking.
|
|
248
241
|
*
|
|
249
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
250
|
-
* `false` value. Otherwise, there's no problem on the `input` value, it
|
|
251
|
-
* `true` after removing all superfluous properties, including nested
|
|
242
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
243
|
+
* returns `false` value. Otherwise, there's no problem on the `input` value, it
|
|
244
|
+
* returns `true` after removing all superfluous properties, including nested
|
|
245
|
+
* objects.
|
|
252
246
|
*
|
|
247
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
253
248
|
* @template T Type of the input value
|
|
254
249
|
* @param input Target instance to check and prune
|
|
255
250
|
* @returns Whether the parametric value is following the type `T` or not
|
|
256
|
-
*
|
|
257
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
258
251
|
*/
|
|
259
252
|
export declare function isPrune<T>(input: unknown): input is T;
|
|
260
253
|
/**
|
|
261
254
|
* Prune, erase superfluous properties, with type validation.
|
|
262
255
|
*
|
|
263
256
|
* `typia.misc.validatePrune()` is a combination function of {@link validate} and
|
|
264
|
-
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
265
|
-
* object including nested objects, with type validation.
|
|
257
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
258
|
+
* `input` object including nested objects, with type validation.
|
|
266
259
|
*
|
|
267
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
268
|
-
* {@link IValidation.IFailure} value with detailed error reasons.
|
|
269
|
-
* no problem on the `input` value, it returns
|
|
270
|
-
* removing all superfluous properties,
|
|
260
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
261
|
+
* returns {@link IValidation.IFailure} value with detailed error reasons.
|
|
262
|
+
* Otherwise, there's no problem on the `input` value, it returns
|
|
263
|
+
* {@link IValidation.ISuccess} value after removing all superfluous properties,
|
|
264
|
+
* including nested objects.
|
|
271
265
|
*
|
|
266
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
272
267
|
* @template T Type of the input value
|
|
273
268
|
* @param input Target instance to validate and prune
|
|
274
269
|
* @returns Validation result
|
|
275
|
-
*
|
|
276
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
277
270
|
*/
|
|
278
271
|
export declare function validatePrune<T>(input: T): IValidation<T>;
|
|
279
272
|
/**
|
|
280
273
|
* Prune, erase superfluous properties, with type validation.
|
|
281
274
|
*
|
|
282
275
|
* `typia.misc.validatePrune()` is a combination function of {@link validate} and
|
|
283
|
-
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
284
|
-
* object including nested objects, with type validation.
|
|
276
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the
|
|
277
|
+
* `input` object including nested objects, with type validation.
|
|
285
278
|
*
|
|
286
|
-
* In such reason, when `input` value is not matched with the type `T`, it
|
|
287
|
-
* {@link IValidation.IFailure} value with detailed error reasons.
|
|
288
|
-
* no problem on the `input` value, it returns
|
|
289
|
-
* removing all superfluous properties,
|
|
279
|
+
* In such reason, when `input` value is not matched with the type `T`, it
|
|
280
|
+
* returns {@link IValidation.IFailure} value with detailed error reasons.
|
|
281
|
+
* Otherwise, there's no problem on the `input` value, it returns
|
|
282
|
+
* {@link IValidation.ISuccess} value after removing all superfluous properties,
|
|
283
|
+
* including nested objects.
|
|
290
284
|
*
|
|
285
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
291
286
|
* @template T Type of the input value
|
|
292
287
|
* @param input Target instance to validate and prune
|
|
293
288
|
* @returns Validation result
|
|
294
|
-
*
|
|
295
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
296
289
|
*/
|
|
297
290
|
export declare function validatePrune<T>(input: unknown): IValidation<T>;
|
|
298
291
|
/**
|
|
299
292
|
* Creates a reusable {@link clone} function.
|
|
300
293
|
*
|
|
301
|
-
* @danger You must configure the generic argument `T`
|
|
302
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
303
|
-
* @throws compile error
|
|
304
|
-
*
|
|
305
294
|
* @author Jeongho Nam - https://github.com/samchon
|
|
295
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
296
|
+
* @throws Compile error
|
|
297
|
+
* @danger You must configure the generic argument `T`
|
|
306
298
|
*/
|
|
307
299
|
export declare function createClone(): never;
|
|
308
300
|
/**
|
|
309
301
|
* Creates a reusable {@link clone} function.
|
|
310
302
|
*
|
|
303
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
311
304
|
* @template T Type of the input value
|
|
312
305
|
* @returns A reusable `clone` function
|
|
313
|
-
*
|
|
314
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
315
306
|
*/
|
|
316
307
|
export declare function createClone<T>(): (input: T) => Resolved<T>;
|
|
317
308
|
/**
|
|
318
309
|
* Creates a reusable {@link assertClone} function.
|
|
319
310
|
*
|
|
320
|
-
* @
|
|
311
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
321
312
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
322
313
|
* @returns Nothing until you configure the generic argument `T`
|
|
323
|
-
* @throws
|
|
324
|
-
*
|
|
325
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
314
|
+
* @throws Compile error
|
|
315
|
+
* @danger You must configure the generic argument `T`
|
|
326
316
|
*/
|
|
327
317
|
export declare function createAssertClone(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
328
318
|
/**
|
|
329
319
|
* Creates a reusable {@link assertClone} function.
|
|
330
320
|
*
|
|
321
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
331
322
|
* @template T Type of the input value
|
|
332
323
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
333
324
|
* @returns A reusable `clone` function
|
|
334
|
-
*
|
|
335
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
336
325
|
*/
|
|
337
326
|
export declare function createAssertClone<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: unknown) => Resolved<T>;
|
|
338
327
|
/**
|
|
339
328
|
* Creates a reusable {@link isClone} function.
|
|
340
329
|
*
|
|
341
|
-
* @danger You must configure the generic argument `T`
|
|
342
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
343
|
-
* @throws compile error
|
|
344
|
-
*
|
|
345
330
|
* @author Jeongho Nam - https://github.com/samchon
|
|
331
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
332
|
+
* @throws Compile error
|
|
333
|
+
* @danger You must configure the generic argument `T`
|
|
346
334
|
*/
|
|
347
335
|
export declare function createIsClone(): never;
|
|
348
336
|
/**
|
|
349
337
|
* Creates a reusable {@link isClone} function.
|
|
350
338
|
*
|
|
339
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
351
340
|
* @template T Type of the input value
|
|
352
341
|
* @returns A reusable `clone` function
|
|
353
|
-
*
|
|
354
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
355
342
|
*/
|
|
356
343
|
export declare function createIsClone<T>(): (input: unknown) => Resolved<T> | null;
|
|
357
344
|
/**
|
|
358
345
|
* Creates a reusable {@link validateClone} function.
|
|
359
346
|
*
|
|
360
|
-
* @danger You must configure the generic argument `T`
|
|
361
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
362
|
-
* @throws compile error
|
|
363
|
-
*
|
|
364
347
|
* @author Jeongho Nam - https://github.com/samchon
|
|
348
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
349
|
+
* @throws Compile error
|
|
350
|
+
* @danger You must configure the generic argument `T`
|
|
365
351
|
*/
|
|
366
352
|
export declare function createValidateClone(): never;
|
|
367
353
|
/**
|
|
368
354
|
* Creates a reusable {@link validateClone} function.
|
|
369
355
|
*
|
|
356
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
370
357
|
* @template T Type of the input value
|
|
371
358
|
* @returns A reusable `clone` function
|
|
372
|
-
*
|
|
373
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
374
359
|
*/
|
|
375
360
|
export declare function createValidateClone<T>(): (input: unknown) => IValidation<Resolved<T>>;
|
|
376
361
|
/**
|
|
377
362
|
* Creates a reusable {@link prune} function.
|
|
378
363
|
*
|
|
379
|
-
* @danger You must configure the generic argument `T`
|
|
380
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
381
|
-
* @throws compile error
|
|
382
|
-
*
|
|
383
364
|
* @author Jeongho Nam - https://github.com/samchon
|
|
365
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
366
|
+
* @throws Compile error
|
|
367
|
+
* @danger You must configure the generic argument `T`
|
|
384
368
|
*/
|
|
385
369
|
export declare function createPrune(): never;
|
|
386
370
|
/**
|
|
387
371
|
* Creates a reusable {@link prune} function.
|
|
388
372
|
*
|
|
373
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
389
374
|
* @template T Type of the input value
|
|
390
375
|
* @returns A reusable `prune` function
|
|
391
|
-
*
|
|
392
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
393
376
|
*/
|
|
394
377
|
export declare function createPrune<T extends object>(): (input: T) => void;
|
|
395
378
|
/**
|
|
396
379
|
* Creates a reusable {@link assertPrune} function.
|
|
397
380
|
*
|
|
398
|
-
* @
|
|
381
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
399
382
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
400
383
|
* @returns Nothing until you configure the generic argument `T`
|
|
401
|
-
* @throws
|
|
402
|
-
*
|
|
403
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
384
|
+
* @throws Compile error
|
|
385
|
+
* @danger You must configure the generic argument `T`
|
|
404
386
|
*/
|
|
405
387
|
export declare function createAssertPrune(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
406
388
|
/**
|
|
407
389
|
* Creates a reusable {@link assertPrune} function.
|
|
408
390
|
*
|
|
391
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
409
392
|
* @template T Type of the input value
|
|
410
393
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
411
394
|
* @returns A reusable `isPrune` function
|
|
412
|
-
*
|
|
413
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
414
395
|
*/
|
|
415
396
|
export declare function createAssertPrune<T extends object>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: T) => T;
|
|
416
397
|
/**
|
|
417
398
|
* Creates a reusable {@link isPrune} function.
|
|
418
399
|
*
|
|
419
|
-
* @danger You must configure the generic argument `T`
|
|
420
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
421
|
-
* @throws compile error
|
|
422
|
-
*
|
|
423
400
|
* @author Jeongho Nam - https://github.com/samchon
|
|
401
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
402
|
+
* @throws Compile error
|
|
403
|
+
* @danger You must configure the generic argument `T`
|
|
424
404
|
*/
|
|
425
405
|
export declare function createIsPrune(): never;
|
|
426
406
|
/**
|
|
427
407
|
* Creates a reusable {@link isPrune} function.
|
|
428
408
|
*
|
|
409
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
429
410
|
* @template T Type of the input value
|
|
430
411
|
* @returns A reusable `isPrune` function
|
|
431
|
-
*
|
|
432
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
433
412
|
*/
|
|
434
413
|
export declare function createIsPrune<T extends object>(): (input: T) => input is T;
|
|
435
414
|
/**
|
|
436
415
|
* Creates a reusable {@link validatePrune} function.
|
|
437
416
|
*
|
|
438
|
-
* @danger You must configure the generic argument `T`
|
|
439
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
440
|
-
* @throws compile error
|
|
441
|
-
*
|
|
442
417
|
* @author Jeongho Nam - https://github.com/samchon
|
|
418
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
419
|
+
* @throws Compile error
|
|
420
|
+
* @danger You must configure the generic argument `T`
|
|
443
421
|
*/
|
|
444
422
|
export declare function createValidatePrune(): never;
|
|
445
423
|
/**
|
|
446
424
|
* Creates a reusable {@link validatePrune} function.
|
|
447
425
|
*
|
|
426
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
448
427
|
* @template T Type of the input value
|
|
449
428
|
* @returns A reusable `validatePrune` function
|
|
450
|
-
*
|
|
451
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
452
429
|
*/
|
|
453
430
|
export declare function createValidatePrune<T extends object>(): (input: T) => IValidation<T>;
|