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/http.d.mts
CHANGED
|
@@ -7,9 +7,9 @@ import { TypeGuardError } from "./TypeGuardError";
|
|
|
7
7
|
* Form data decoder.
|
|
8
8
|
*
|
|
9
9
|
* `typia.http.formData()` is a function decoding `FormData` instance, with
|
|
10
|
-
* automatic type casting to the expected type. When property type is defined
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* automatic type casting to the expected type. When property type is defined as
|
|
11
|
+
* `boolean` or `Blob` type, `typia.http.formData()` will cast the value to the
|
|
12
|
+
* expected type when decoding.
|
|
13
13
|
*
|
|
14
14
|
* By the way, as `FormData` is not enough to express complex data structures,
|
|
15
15
|
* `typia.http.formData()` function has some limitations. If target type `T` is
|
|
@@ -17,138 +17,139 @@ import { TypeGuardError } from "./TypeGuardError";
|
|
|
17
17
|
*
|
|
18
18
|
* 1. Type `T` must be an object type
|
|
19
19
|
* 2. Do not allow dynamic property
|
|
20
|
-
* 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array
|
|
20
|
+
* 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array
|
|
21
|
+
* types are allowed
|
|
21
22
|
* 4. Union types are never allowed
|
|
22
23
|
*
|
|
23
24
|
* Also, `typia.http.formData()` function does not perform validation about the
|
|
24
25
|
* decoded value. Therefore, if you can't sure that input data is following the
|
|
25
26
|
* `T` type, it would better to call one of below functions instead.
|
|
26
27
|
*
|
|
28
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
27
29
|
* @template T Expected type of decoded value
|
|
28
30
|
* @param input FormData instance
|
|
29
31
|
* @returns Decoded form FormData
|
|
30
|
-
*
|
|
31
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
32
32
|
*/
|
|
33
33
|
export declare function formData<T extends object>(input: FormData): Resolved<T>;
|
|
34
34
|
/**
|
|
35
35
|
* Form data decoder with type assertion.
|
|
36
36
|
*
|
|
37
|
-
* `typia.http.assertFormData()` is a function decoding `FormData` instance,
|
|
38
|
-
* automatic type casting to the expected type. When property type is
|
|
39
|
-
* as `boolean` or `Blob` type, `typia.http.assertFormData()` will cast
|
|
40
|
-
* to the expected type when decoding.
|
|
37
|
+
* `typia.http.assertFormData()` is a function decoding `FormData` instance,
|
|
38
|
+
* with automatic type casting to the expected type. When property type is
|
|
39
|
+
* defined as `boolean` or `Blob` type, `typia.http.assertFormData()` will cast
|
|
40
|
+
* the value to the expected type when decoding.
|
|
41
41
|
*
|
|
42
|
-
* Also, after decoding, `typia.http.assertFormData()` performs type assertion
|
|
43
|
-
* the decoded value by combining with {@link assert} function. Therefore,
|
|
44
|
-
* the decoded value is not following the `T` type, {@link TypeGuardError}
|
|
45
|
-
* custom error generated by
|
|
42
|
+
* Also, after decoding, `typia.http.assertFormData()` performs type assertion
|
|
43
|
+
* to the decoded value by combining with {@link assert} function. Therefore,
|
|
44
|
+
* when the decoded value is not following the `T` type, {@link TypeGuardError}
|
|
45
|
+
* or custom error generated by _errorFactory_ would be thrown.
|
|
46
46
|
*
|
|
47
47
|
* By the way, as `FormData` is not enough to express complex data structures,
|
|
48
|
-
* `typia.http.assertFormData()` function has some limitations. If target type
|
|
49
|
-
* is not following those restrictions, compilation errors would be
|
|
48
|
+
* `typia.http.assertFormData()` function has some limitations. If target type
|
|
49
|
+
* `T` is not following those restrictions, compilation errors would be
|
|
50
|
+
* occurred.
|
|
50
51
|
*
|
|
51
52
|
* 1. Type `T` must be an object type
|
|
52
53
|
* 2. Do not allow dynamic property
|
|
53
|
-
* 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array
|
|
54
|
+
* 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array
|
|
55
|
+
* types are allowed
|
|
54
56
|
* 4. Union types are never allowed
|
|
55
57
|
*
|
|
58
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
56
59
|
* @template T Expected type of decoded value
|
|
57
60
|
* @param input FormData instance
|
|
58
61
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
59
62
|
* @returns Decoded form FormData
|
|
60
|
-
*
|
|
61
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
62
63
|
*/
|
|
63
64
|
export declare function assertFormData<T extends object>(input: FormData, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Resolved<T>;
|
|
64
65
|
/**
|
|
65
66
|
* Form data decoder with type checking.
|
|
66
67
|
*
|
|
67
68
|
* `typia.http.isFormData()` is a function decoding `FormData` instance, with
|
|
68
|
-
* automatic type casting to the expected type. When property type is defined
|
|
69
|
-
*
|
|
70
|
-
*
|
|
69
|
+
* automatic type casting to the expected type. When property type is defined as
|
|
70
|
+
* `boolean` or `Blob` type, `typia.http.isFormData()` will cast the value to
|
|
71
|
+
* the expected type when decoding.
|
|
71
72
|
*
|
|
72
73
|
* Also, after decoding, `typia.http.isFormData()` performs type checking to the
|
|
73
74
|
* decoded value by combining with {@link is} function. Therefore, when the
|
|
74
75
|
* decoded value is not following the `T` type, `null` value would be returned.
|
|
75
76
|
*
|
|
76
77
|
* By the way, as `FormData` is not enough to express complex data structures,
|
|
77
|
-
* `typia.http.isFormData()` function has some limitations. If target type `T`
|
|
78
|
-
* not following those restrictions, compilation errors would be occurred.
|
|
78
|
+
* `typia.http.isFormData()` function has some limitations. If target type `T`
|
|
79
|
+
* is not following those restrictions, compilation errors would be occurred.
|
|
79
80
|
*
|
|
80
81
|
* 1. Type `T` must be an object type
|
|
81
82
|
* 2. Do not allow dynamic property
|
|
82
|
-
* 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array
|
|
83
|
+
* 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array
|
|
84
|
+
* types are allowed
|
|
83
85
|
* 4. Union types are never allowed
|
|
84
86
|
*
|
|
87
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
85
88
|
* @template T Expected type of decoded value
|
|
86
89
|
* @param input FormData instance
|
|
87
90
|
* @returns Decoded form FormData or `null` value
|
|
88
|
-
*
|
|
89
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
90
91
|
*/
|
|
91
92
|
export declare function isFormData<T extends object>(input: FormData): Resolved<T> | null;
|
|
92
93
|
/**
|
|
93
94
|
* Form data decoder with type validation.
|
|
94
95
|
*
|
|
95
96
|
* `typia.http.validateFormData()` is a function decoding `FormData` instance,
|
|
96
|
-
* with automatic type casting to the expected type. When property type is
|
|
97
|
-
* as `boolean` or `Blob` type, `typia.http.validateFormData()` will
|
|
98
|
-
* value to the expected type when decoding.
|
|
97
|
+
* with automatic type casting to the expected type. When property type is
|
|
98
|
+
* defined as `boolean` or `Blob` type, `typia.http.validateFormData()` will
|
|
99
|
+
* cast the value to the expected type when decoding.
|
|
99
100
|
*
|
|
100
|
-
* Also, after decoding, `typia.http.validateFormData()` performs type
|
|
101
|
-
* to the decoded value by combining with {@link validate} function.
|
|
102
|
-
* when the decoded value is not following the `T` type,
|
|
103
|
-
* {@link IValidation.IFailure} would be returned. Otherwise,
|
|
104
|
-
*
|
|
101
|
+
* Also, after decoding, `typia.http.validateFormData()` performs type
|
|
102
|
+
* validation to the decoded value by combining with {@link validate} function.
|
|
103
|
+
* Therefore, when the decoded value is not following the `T` type,
|
|
104
|
+
* {@link IValidation.IFailure} would be returned. Otherwise, x@xxxx
|
|
105
|
+
* IValidation.ISuccess} would be returned.
|
|
105
106
|
*
|
|
106
107
|
* By the way, as `FormData` is not enough to express complex data structures,
|
|
107
108
|
* `typia.http.validateFormData()` function has some limitations. If target type
|
|
108
|
-
* `T` is not following those restrictions, compilation errors would be
|
|
109
|
+
* `T` is not following those restrictions, compilation errors would be
|
|
110
|
+
* occurred.
|
|
109
111
|
*
|
|
110
112
|
* 1. Type `T` must be an object type
|
|
111
113
|
* 2. Do not allow dynamic property
|
|
112
|
-
* 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array
|
|
114
|
+
* 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array
|
|
115
|
+
* types are allowed
|
|
113
116
|
* 4. Union types are never allowed
|
|
114
117
|
*
|
|
118
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
115
119
|
* @template T Expected type of decoded value
|
|
116
120
|
* @param input FormData instance
|
|
117
121
|
* @returns Validation result with decoded form FormData
|
|
118
|
-
*
|
|
119
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
120
122
|
*/
|
|
121
123
|
export declare function validateFormData<T extends object>(input: FormData): IValidation<Resolved<T>>;
|
|
122
124
|
/**
|
|
123
125
|
* URL query decoder.
|
|
124
126
|
*
|
|
125
|
-
* `typia.http.query()` is a function decoding a query string or an
|
|
126
|
-
* instance, with automatic type casting to the expected type.
|
|
127
|
-
* defined as `boolean` or `number` type,
|
|
128
|
-
* the expected type when decoding.
|
|
127
|
+
* `typia.http.query()` is a function decoding a query string or an
|
|
128
|
+
* `URLSearchParams` instance, with automatic type casting to the expected type.
|
|
129
|
+
* When property type be defined as `boolean` or `number` type,
|
|
130
|
+
* `typia.http.query()` will cast the value to the expected type when decoding.
|
|
129
131
|
*
|
|
130
132
|
* By the way, as URL query is not enough to express complex data structures,
|
|
131
133
|
* `typia.http.query()` function has some limitations. If target type `T` is not
|
|
132
134
|
* following those restrictions, compilation errors would be occurred.
|
|
133
135
|
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
136
|
+
* 1. Type `T` must be an object type
|
|
137
|
+
* 2. Do not allow dynamic property
|
|
138
|
+
* 3. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed
|
|
139
|
+
* 4. Union types are never allowed
|
|
138
140
|
*
|
|
139
|
-
* Also, `typia.http.query()` function does not perform validation about the
|
|
140
|
-
* value. Therefore, if you can't sure that input data is following the
|
|
141
|
-
* it would better to call one of below functions instead.
|
|
141
|
+
* Also, `typia.http.query()` function does not perform validation about the
|
|
142
|
+
* decoded value. Therefore, if you can't sure that input data is following the
|
|
143
|
+
* `T` type, it would better to call one of below functions instead.
|
|
142
144
|
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
145
|
+
* - {@link assertQuery}
|
|
146
|
+
* - {@link isQuery}
|
|
147
|
+
* - {@link validateQuery}
|
|
146
148
|
*
|
|
149
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
147
150
|
* @template T Expected type of decoded value
|
|
148
151
|
* @param input Query string or URLSearchParams instance
|
|
149
152
|
* @returns Decoded query object
|
|
150
|
-
*
|
|
151
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
152
153
|
*/
|
|
153
154
|
export declare function query<T extends object>(input: string | IReadableURLSearchParams): Resolved<T>;
|
|
154
155
|
/**
|
|
@@ -157,28 +158,28 @@ export declare function query<T extends object>(input: string | IReadableURLSear
|
|
|
157
158
|
* `typia.http.assertQuery()` is a function decoding a query string or an
|
|
158
159
|
* `URLSearchParams` instance, with automatic type casting to the expected type.
|
|
159
160
|
* When property type is defined as `boolean` or `number` type,
|
|
160
|
-
* `typia.http.assertQuery()` will cast the value to the expected type when
|
|
161
|
+
* `typia.http.assertQuery()` will cast the value to the expected type when
|
|
162
|
+
* decoding.
|
|
161
163
|
*
|
|
162
|
-
* Also, after decoding, `typia.http.assertQuery()` performs type assertion to
|
|
163
|
-
* decoded value by combining with {@link assert} function. Therefore, when
|
|
164
|
-
* decoded value is not following the `T` type, {@link TypeGuardError} or
|
|
165
|
-
* error generated by
|
|
164
|
+
* Also, after decoding, `typia.http.assertQuery()` performs type assertion to
|
|
165
|
+
* the decoded value by combining with {@link assert} function. Therefore, when
|
|
166
|
+
* the decoded value is not following the `T` type, {@link TypeGuardError} or
|
|
167
|
+
* custom error generated by _errorFactory_ would be thrown.
|
|
166
168
|
*
|
|
167
169
|
* By the way, as URL query is not enough to express complex data structures,
|
|
168
|
-
* `typia.http.assertQuery()` function has some limitations. If target type `T`
|
|
169
|
-
* notfollowing those restrictions, compilation errors would be occurred.
|
|
170
|
+
* `typia.http.assertQuery()` function has some limitations. If target type `T`
|
|
171
|
+
* is notfollowing those restrictions, compilation errors would be occurred.
|
|
170
172
|
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
173
|
+
* 1. Type `T` must be an object type
|
|
174
|
+
* 2. Do not allow dynamic property
|
|
175
|
+
* 3. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed
|
|
176
|
+
* 4. Union types are never allowed
|
|
175
177
|
*
|
|
178
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
176
179
|
* @template T Expected type of decoded value
|
|
177
180
|
* @param input Query string or URLSearchParams instance
|
|
178
181
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
179
182
|
* @returns Decoded query object
|
|
180
|
-
*
|
|
181
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
182
183
|
*/
|
|
183
184
|
export declare function assertQuery<T extends object>(input: string | IReadableURLSearchParams, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Resolved<T>;
|
|
184
185
|
/**
|
|
@@ -187,7 +188,8 @@ export declare function assertQuery<T extends object>(input: string | IReadableU
|
|
|
187
188
|
* `typia.http.isQuery()` is a function decoding a query string or an
|
|
188
189
|
* `URLSearchParams` instance, with automatic type casting to the expected type.
|
|
189
190
|
* When property type is defined as `boolean` or `number` type,
|
|
190
|
-
* `typia.http.isQuery()` will cast the value to the expected type when
|
|
191
|
+
* `typia.http.isQuery()` will cast the value to the expected type when
|
|
192
|
+
* decoding.
|
|
191
193
|
*
|
|
192
194
|
* Also, after decoding, `typia.http.isQuery()` performs type checking to the
|
|
193
195
|
* decoded value by combining with {@link is} function. Therefore, when the
|
|
@@ -197,16 +199,15 @@ export declare function assertQuery<T extends object>(input: string | IReadableU
|
|
|
197
199
|
* `typia.http.isQuery()` function has some limitations. If target type `T` is
|
|
198
200
|
* notfollowing those restrictions, compilation errors would be occurred.
|
|
199
201
|
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
202
|
+
* 1. Type `T` must be an object type
|
|
203
|
+
* 2. Do not allow dynamic property
|
|
204
|
+
* 3. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed
|
|
205
|
+
* 4. Union types are never allowed
|
|
204
206
|
*
|
|
207
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
205
208
|
* @template T Expected type of decoded value
|
|
206
209
|
* @param input Query string or URLSearchParams instance
|
|
207
210
|
* @returns Decoded query object or `null` value
|
|
208
|
-
*
|
|
209
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
210
211
|
*/
|
|
211
212
|
export declare function isQuery<T extends object>(input: string | IReadableURLSearchParams): Resolved<T> | null;
|
|
212
213
|
/**
|
|
@@ -215,80 +216,84 @@ export declare function isQuery<T extends object>(input: string | IReadableURLSe
|
|
|
215
216
|
* `typia.http.validateQuery()` is a function decoding a query string or an
|
|
216
217
|
* `URLSearchParams` instance, with automatic type casting to the expected type.
|
|
217
218
|
* When property type is defined as `boolean` or `number` type,
|
|
218
|
-
* `typia.http.validateQuery()` will cast the value to the expected type when
|
|
219
|
+
* `typia.http.validateQuery()` will cast the value to the expected type when
|
|
220
|
+
* decoding.
|
|
219
221
|
*
|
|
220
|
-
* Also, after decoding, `typia.http.validateQuery()` performs type validation
|
|
221
|
-
* decoded value by combining with {@link validate} function. Therefore,
|
|
222
|
-
* decoded value is not following the `T` type,
|
|
223
|
-
*
|
|
222
|
+
* Also, after decoding, `typia.http.validateQuery()` performs type validation
|
|
223
|
+
* to the decoded value by combining with {@link validate} function. Therefore,
|
|
224
|
+
* when the decoded value is not following the `T` type,
|
|
225
|
+
* {@link IValidation.IFailure} would be returned. Otherwise,
|
|
226
|
+
* {@link IValidation.ISuccess} would be returned.
|
|
224
227
|
*
|
|
225
228
|
* By the way, as URL query is not enough to express complex data structures,
|
|
226
|
-
* `typia.http.validateQuery()` function has some limitations. If target type
|
|
227
|
-
* notfollowing those restrictions, compilation errors would be
|
|
229
|
+
* `typia.http.validateQuery()` function has some limitations. If target type
|
|
230
|
+
* `T` is notfollowing those restrictions, compilation errors would be
|
|
231
|
+
* occurred.
|
|
228
232
|
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
+
* 1. Type `T` must be an object type
|
|
234
|
+
* 2. Do not allow dynamic property
|
|
235
|
+
* 3. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed
|
|
236
|
+
* 4. Union types are never allowed
|
|
233
237
|
*
|
|
238
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
234
239
|
* @template T Expected type of decoded value
|
|
235
240
|
* @param input Query string or URLSearchParams instance
|
|
236
241
|
* @returns Validation result with decoded query object
|
|
237
|
-
*
|
|
238
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
239
242
|
*/
|
|
240
243
|
export declare function validateQuery<T extends object>(input: string | IReadableURLSearchParams): IValidation<Resolved<T>>;
|
|
241
244
|
/**
|
|
242
245
|
* Headers decoder (for express and fastify).
|
|
243
246
|
*
|
|
244
|
-
* `typia.http.headers()` is a function decoding an header instance, with
|
|
245
|
-
* type casting to the expected type. When property type is defined as
|
|
246
|
-
* `number` type, `typia.http.headers()` will cast the value to the
|
|
247
|
+
* `typia.http.headers()` is a function decoding an header instance, with
|
|
248
|
+
* automatic type casting to the expected type. When property type is defined as
|
|
249
|
+
* `boolean` or `number` type, `typia.http.headers()` will cast the value to the
|
|
250
|
+
* expected type.
|
|
247
251
|
*
|
|
248
|
-
* By the way, as HTTP headers are not enough to express complex data
|
|
249
|
-
* `typia.http.headers()` function has some limitations. If target
|
|
250
|
-
* following those restrictions, compilation errors would be
|
|
252
|
+
* By the way, as HTTP headers are not enough to express complex data
|
|
253
|
+
* structures, `typia.http.headers()` function has some limitations. If target
|
|
254
|
+
* type `T` is not following those restrictions, compilation errors would be
|
|
255
|
+
* occurred.
|
|
251
256
|
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
257
|
+
* 1. Type `T` must be an object type
|
|
258
|
+
* 2. Do not allow dynamic property
|
|
259
|
+
* 3. Property key must be lower case
|
|
260
|
+
* 4. Property value cannot be `null`, but `undefined` is possible
|
|
261
|
+
* 5. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed
|
|
262
|
+
* 6. Union types are never allowed
|
|
263
|
+
* 7. Property `set-cookie` must be array type
|
|
264
|
+
* 8. Those properties cannot be array type
|
|
265
|
+
*
|
|
266
|
+
* - Age
|
|
267
|
+
* - Authorization
|
|
268
|
+
* - Content-length
|
|
269
|
+
* - Content-type
|
|
270
|
+
* - Etag
|
|
271
|
+
* - Expires
|
|
272
|
+
* - From
|
|
273
|
+
* - Host
|
|
274
|
+
* - If-modified-since
|
|
275
|
+
* - If-unmodified-since
|
|
276
|
+
* - Last-modified
|
|
277
|
+
* - Location
|
|
278
|
+
* - Max-forwards
|
|
279
|
+
* - Proxy-authorization
|
|
280
|
+
* - Referer
|
|
281
|
+
* - Retry-after
|
|
282
|
+
* - Server
|
|
283
|
+
* - User-agent
|
|
284
|
+
*
|
|
285
|
+
* Also, `typia.http.headers()` function does not perform validation about the
|
|
286
|
+
* decoded value. Therefore, if you can't sure that input data is following the
|
|
287
|
+
* `T` type, it would better to call one of below functions instead.
|
|
288
|
+
*
|
|
289
|
+
* - {@link assertHeaders}
|
|
290
|
+
* - {@link isHeaders}
|
|
291
|
+
* - {@link validateHeaders}
|
|
286
292
|
*
|
|
293
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
287
294
|
* @template T Expected type of decoded value
|
|
288
295
|
* @param input Query string or URLSearchParams instance
|
|
289
296
|
* @returns Decoded headers object
|
|
290
|
-
*
|
|
291
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
292
297
|
*/
|
|
293
298
|
export declare function headers<T extends object>(input: Record<string, string | string[] | undefined>): Resolved<T>;
|
|
294
299
|
/**
|
|
@@ -299,48 +304,49 @@ export declare function headers<T extends object>(input: Record<string, string |
|
|
|
299
304
|
* `boolean` or `number` type, `typia.http.headers()` will cast the value to the
|
|
300
305
|
* expected type.
|
|
301
306
|
*
|
|
302
|
-
* Also, after decoding, `typia.http.assertHeaders()` performs type assertion to
|
|
303
|
-
* decoded value by combining with {@link assert} function. Therefore, when
|
|
304
|
-
* decoded value is not following the `T` type, {@link TypeGuardError} or
|
|
305
|
-
* error generated by
|
|
307
|
+
* Also, after decoding, `typia.http.assertHeaders()` performs type assertion to
|
|
308
|
+
* the decoded value by combining with {@link assert} function. Therefore, when
|
|
309
|
+
* the decoded value is not following the `T` type, {@link TypeGuardError} or
|
|
310
|
+
* custom error generated by _errorFactory_ would be thrown.
|
|
306
311
|
*
|
|
307
|
-
* By the way, as HTTP headers are not enough to express complex data
|
|
308
|
-
* `typia.http.headers()` function has some limitations. If target
|
|
309
|
-
* following those restrictions, compilation errors would be
|
|
312
|
+
* By the way, as HTTP headers are not enough to express complex data
|
|
313
|
+
* structures, `typia.http.headers()` function has some limitations. If target
|
|
314
|
+
* type `T` is not following those restrictions, compilation errors would be
|
|
315
|
+
* occurred.
|
|
310
316
|
*
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
*
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
*
|
|
334
|
-
*
|
|
335
|
-
*
|
|
336
|
-
*
|
|
317
|
+
* 1. Type `T` must be an object type
|
|
318
|
+
* 2. Do not allow dynamic property
|
|
319
|
+
* 3. Property key must be lower case
|
|
320
|
+
* 4. Property value cannot be `null`, but `undefined` is possible
|
|
321
|
+
* 5. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed
|
|
322
|
+
* 6. Union types are never allowed
|
|
323
|
+
* 7. Property `set-cookie` must be array type
|
|
324
|
+
* 8. Those properties cannot be array type
|
|
325
|
+
*
|
|
326
|
+
* - Age
|
|
327
|
+
* - Authorization
|
|
328
|
+
* - Content-length
|
|
329
|
+
* - Content-type
|
|
330
|
+
* - Etag
|
|
331
|
+
* - Expires
|
|
332
|
+
* - From
|
|
333
|
+
* - Host
|
|
334
|
+
* - If-modified-since
|
|
335
|
+
* - If-unmodified-since
|
|
336
|
+
* - Last-modified
|
|
337
|
+
* - Location
|
|
338
|
+
* - Max-forwards
|
|
339
|
+
* - Proxy-authorization
|
|
340
|
+
* - Referer
|
|
341
|
+
* - Retry-after
|
|
342
|
+
* - Server
|
|
343
|
+
* - User-agent
|
|
337
344
|
*
|
|
345
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
338
346
|
* @template T Expected type of decoded value
|
|
339
347
|
* @param input Query string or URLSearchParams instance
|
|
340
348
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
341
349
|
* @returns Decoded headers object
|
|
342
|
-
*
|
|
343
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
344
350
|
*/
|
|
345
351
|
export declare function assertHeaders<T extends object>(input: Record<string, string | string[] | undefined>, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Resolved<T>;
|
|
346
352
|
/**
|
|
@@ -357,105 +363,109 @@ export declare function assertHeaders<T extends object>(input: Record<string, st
|
|
|
357
363
|
* decoded value by combining with {@link is} function. Therefore, when the
|
|
358
364
|
* decoded value is not following the `T` type, `null` value would be returned.
|
|
359
365
|
*
|
|
360
|
-
* By the way, as HTTP headers are not enough to express complex data
|
|
361
|
-
* `typia.http.headers()` function has some limitations. If target
|
|
362
|
-
* following those restrictions, compilation errors would be
|
|
366
|
+
* By the way, as HTTP headers are not enough to express complex data
|
|
367
|
+
* structures, `typia.http.headers()` function has some limitations. If target
|
|
368
|
+
* type `T` is not following those restrictions, compilation errors would be
|
|
369
|
+
* occurred.
|
|
363
370
|
*
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
*
|
|
380
|
-
*
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
*
|
|
371
|
+
* 1. Type `T` must be an object type
|
|
372
|
+
* 2. Do not allow dynamic property
|
|
373
|
+
* 3. Property key must be lower case
|
|
374
|
+
* 4. Property value cannot be `null`, but `undefined` is possible
|
|
375
|
+
* 5. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed
|
|
376
|
+
* 6. Union types are never allowed
|
|
377
|
+
* 7. Property `set-cookie` must be array type
|
|
378
|
+
* 8. Those properties cannot be array type
|
|
379
|
+
*
|
|
380
|
+
* - Age
|
|
381
|
+
* - Authorization
|
|
382
|
+
* - Content-length
|
|
383
|
+
* - Content-type
|
|
384
|
+
* - Etag
|
|
385
|
+
* - Expires
|
|
386
|
+
* - From
|
|
387
|
+
* - Host
|
|
388
|
+
* - If-modified-since
|
|
389
|
+
* - If-unmodified-since
|
|
390
|
+
* - Last-modified
|
|
391
|
+
* - Location
|
|
392
|
+
* - Max-forwards
|
|
393
|
+
* - Proxy-authorization
|
|
394
|
+
* - Referer
|
|
395
|
+
* - Retry-after
|
|
396
|
+
* - Server
|
|
397
|
+
* - User-agent
|
|
390
398
|
*
|
|
399
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
391
400
|
* @template T Expected type of decoded value
|
|
392
401
|
* @param input Query string or URLSearchParams instance
|
|
393
402
|
* @returns Decoded headers object or `null` value
|
|
394
|
-
*
|
|
395
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
396
403
|
*/
|
|
397
404
|
export declare function isHeaders<T extends object>(input: Record<string, string | string[] | undefined>): Resolved<T> | null;
|
|
398
405
|
/**
|
|
399
406
|
* Headers decoder with type validation (for express and fastify).
|
|
400
407
|
*
|
|
401
|
-
* `typia.http.validateHeaders()` is a function decoding an header instance,
|
|
402
|
-
* automatic type casting to the expected type. When property type is
|
|
403
|
-
* `boolean` or `number` type, `typia.http.headers()` will cast the
|
|
404
|
-
* expected type.
|
|
408
|
+
* `typia.http.validateHeaders()` is a function decoding an header instance,
|
|
409
|
+
* with automatic type casting to the expected type. When property type is
|
|
410
|
+
* defined as `boolean` or `number` type, `typia.http.headers()` will cast the
|
|
411
|
+
* value to the expected type.
|
|
405
412
|
*
|
|
406
|
-
* Also, after decoding, `typia.http.validateHeaders()` performs type assertion
|
|
407
|
-
* decoded value by combining with {@link validate} function. Therefore,
|
|
408
|
-
* decoded value is not following the `T` type,
|
|
409
|
-
*
|
|
413
|
+
* Also, after decoding, `typia.http.validateHeaders()` performs type assertion
|
|
414
|
+
* to the decoded value by combining with {@link validate} function. Therefore,
|
|
415
|
+
* when the decoded value is not following the `T` type,
|
|
416
|
+
* {@link IValidation.IError} would be returned. Otherwise,
|
|
417
|
+
* {@link IValidation.ISuccess} be returned.
|
|
410
418
|
*
|
|
411
|
-
* By the way, as HTTP headers are not enough to express complex data
|
|
412
|
-
* `typia.http.headers()` function has some limitations. If target
|
|
413
|
-
* following those restrictions, compilation errors would be
|
|
419
|
+
* By the way, as HTTP headers are not enough to express complex data
|
|
420
|
+
* structures, `typia.http.headers()` function has some limitations. If target
|
|
421
|
+
* type `T` is not following those restrictions, compilation errors would be
|
|
422
|
+
* occurred.
|
|
414
423
|
*
|
|
415
|
-
*
|
|
416
|
-
*
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
*
|
|
423
|
-
*
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
*
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
*
|
|
432
|
-
*
|
|
433
|
-
*
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
424
|
+
* 1. Type `T` must be an object type
|
|
425
|
+
* 2. Do not allow dynamic property
|
|
426
|
+
* 3. Property key must be lower case
|
|
427
|
+
* 4. Property value cannot be `null`, but `undefined` is possible
|
|
428
|
+
* 5. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed
|
|
429
|
+
* 6. Union types are never allowed
|
|
430
|
+
* 7. Property `set-cookie` must be array type
|
|
431
|
+
* 8. Those properties cannot be array type
|
|
432
|
+
*
|
|
433
|
+
* - Age
|
|
434
|
+
* - Authorization
|
|
435
|
+
* - Content-length
|
|
436
|
+
* - Content-type
|
|
437
|
+
* - Etag
|
|
438
|
+
* - Expires
|
|
439
|
+
* - From
|
|
440
|
+
* - Host
|
|
441
|
+
* - If-modified-since
|
|
442
|
+
* - If-unmodified-since
|
|
443
|
+
* - Last-modified
|
|
444
|
+
* - Location
|
|
445
|
+
* - Max-forwards
|
|
446
|
+
* - Proxy-authorization
|
|
447
|
+
* - Referer
|
|
448
|
+
* - Retry-after
|
|
449
|
+
* - Server
|
|
450
|
+
* - User-agent
|
|
441
451
|
*
|
|
452
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
442
453
|
* @template T Expected type of decoded value
|
|
443
454
|
* @param input Query string or URLSearchParams instance
|
|
444
455
|
* @returns Decoded headers object
|
|
445
|
-
*
|
|
446
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
447
456
|
*/
|
|
448
457
|
export declare function validateHeaders<T extends object>(input: Record<string, string | string[] | undefined>): IValidation<Resolved<T>>;
|
|
449
458
|
/**
|
|
450
459
|
* URL path parameter decoder.
|
|
451
460
|
*
|
|
452
|
-
* `typia.http.parameter()` is a function decoding a path parameter, with
|
|
453
|
-
* type casting to the expected type. When type `T` has been defined
|
|
454
|
-
* `number` type, `typia.http.parameter()` will cast the value
|
|
461
|
+
* `typia.http.parameter()` is a function decoding a path parameter, with
|
|
462
|
+
* automatic type casting to the expected type. When type `T` has been defined
|
|
463
|
+
* as `boolean` or `number` type, `typia.http.parameter()` will cast the value
|
|
464
|
+
* to the expected type.
|
|
455
465
|
*
|
|
456
|
-
* Also, `typia.http.parameter()` performs type assertion to the decoded value
|
|
457
|
-
* combining with {@link assert} function. Therefore, when the decoded value
|
|
458
|
-
* following the `T` type, {@link TypeGuardError} would be thrown.
|
|
466
|
+
* Also, `typia.http.parameter()` performs type assertion to the decoded value
|
|
467
|
+
* by combining with {@link assert} function. Therefore, when the decoded value
|
|
468
|
+
* is not following the `T` type, {@link TypeGuardError} would be thrown.
|
|
459
469
|
*
|
|
460
470
|
* @template T Expected type of decoded value
|
|
461
471
|
* @param input Path parameter string
|
|
@@ -465,253 +475,227 @@ export declare function parameter<T extends Atomic.Type | null>(input: string):
|
|
|
465
475
|
/**
|
|
466
476
|
* Creates a reusable {@link formdata} function.
|
|
467
477
|
*
|
|
468
|
-
* @danger You must configure the generic argument `T`
|
|
469
|
-
* @template T The type of the formdata object
|
|
470
|
-
* @throws compile error
|
|
471
|
-
*
|
|
472
478
|
* @author Jeongho Nam - https://github.com/samchon
|
|
479
|
+
* @template T The type of the formdata object
|
|
480
|
+
* @throws Compile error
|
|
481
|
+
* @danger You must configure the generic argument `T`
|
|
473
482
|
*/
|
|
474
483
|
export declare function createFormData(): never;
|
|
475
484
|
/**
|
|
476
485
|
* Creates a reusable {@link formdata} function.
|
|
477
486
|
*
|
|
487
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
478
488
|
* @template T The type of the formdata object
|
|
479
489
|
* @returns A reusable `formdata` function
|
|
480
|
-
*
|
|
481
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
482
490
|
*/
|
|
483
491
|
export declare function createFormData<T extends object>(): (input: FormData) => T;
|
|
484
492
|
/**
|
|
485
493
|
* Creates a reusable {@link assertFormData} function.
|
|
486
494
|
*
|
|
487
|
-
* @
|
|
495
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
488
496
|
* @template T The type of the formdata object
|
|
489
497
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
490
|
-
* @throws
|
|
491
|
-
*
|
|
492
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
498
|
+
* @throws Compile error
|
|
499
|
+
* @danger You must configure the generic argument `T`
|
|
493
500
|
*/
|
|
494
501
|
export declare function createAssertFormData(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
495
502
|
/**
|
|
496
503
|
* Creates a reusable {@link assertFormData} function.
|
|
497
504
|
*
|
|
505
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
498
506
|
* @template T The type of the formdata object
|
|
499
507
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
500
508
|
* @returns A reusable `assertFormData` function
|
|
501
|
-
*
|
|
502
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
503
509
|
*/
|
|
504
510
|
export declare function createAssertFormData<T extends object>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: FormData) => T;
|
|
505
511
|
/**
|
|
506
512
|
* Creates a reusable {@link isFormData} function.
|
|
507
513
|
*
|
|
508
|
-
* @danger You must configure the generic argument `T`
|
|
509
|
-
* @template T The type of the formdata object
|
|
510
|
-
* @throws compile error
|
|
511
|
-
*
|
|
512
514
|
* @author Jeongho Nam - https://github.com/samchon
|
|
515
|
+
* @template T The type of the formdata object
|
|
516
|
+
* @throws Compile error
|
|
517
|
+
* @danger You must configure the generic argument `T`
|
|
513
518
|
*/
|
|
514
519
|
export declare function createIsFormData(): never;
|
|
515
520
|
/**
|
|
516
521
|
* Creates a reusable {@link isFormData} function.
|
|
517
522
|
*
|
|
523
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
518
524
|
* @template T The type of the formdata object
|
|
519
525
|
* @returns A reusable `isFormData` function
|
|
520
|
-
*
|
|
521
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
522
526
|
*/
|
|
523
527
|
export declare function createIsFormData<T extends object>(): (input: FormData) => T | null;
|
|
524
528
|
/**
|
|
525
529
|
* Creates a reusable {@link validateFormData} function.
|
|
526
530
|
*
|
|
527
|
-
* @danger You must configure the generic argument `T`
|
|
528
|
-
* @template T The type of the formdata object
|
|
529
|
-
* @throws compile error
|
|
530
|
-
*
|
|
531
531
|
* @author Jeongho Nam - https://github.com/samchon
|
|
532
|
+
* @template T The type of the formdata object
|
|
533
|
+
* @throws Compile error
|
|
534
|
+
* @danger You must configure the generic argument `T`
|
|
532
535
|
*/
|
|
533
536
|
export declare function createValidateFormData(): never;
|
|
534
537
|
/**
|
|
535
538
|
* Creates a reusable {@link validateFormData} function.
|
|
536
539
|
*
|
|
540
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
537
541
|
* @template T The type of the formdata object
|
|
538
542
|
* @returns A reusable `validateFormData` function
|
|
539
|
-
*
|
|
540
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
541
543
|
*/
|
|
542
544
|
export declare function createValidateFormData<T extends object>(): (input: FormData) => IValidation<Resolved<T>>;
|
|
543
545
|
/**
|
|
544
546
|
* Creates a reusable {@link query} function.
|
|
545
547
|
*
|
|
546
|
-
* @danger You must configure the generic argument `T`
|
|
547
|
-
* @template T The type of the query object
|
|
548
|
-
* @throws compile error
|
|
549
|
-
*
|
|
550
548
|
* @author Jeongho Nam - https://github.com/samchon
|
|
549
|
+
* @template T The type of the query object
|
|
550
|
+
* @throws Compile error
|
|
551
|
+
* @danger You must configure the generic argument `T`
|
|
551
552
|
*/
|
|
552
553
|
export declare function createQuery(): never;
|
|
553
554
|
/**
|
|
554
555
|
* Creates a reusable {@link query} function.
|
|
555
556
|
*
|
|
557
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
556
558
|
* @template T The type of the query object
|
|
557
559
|
* @returns A reusable `query` function
|
|
558
|
-
*
|
|
559
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
560
560
|
*/
|
|
561
561
|
export declare function createQuery<T extends object>(): (input: string | IReadableURLSearchParams) => T;
|
|
562
562
|
/**
|
|
563
563
|
* Creates a reusable {@link assertQuery} function.
|
|
564
564
|
*
|
|
565
|
-
* @
|
|
565
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
566
566
|
* @template T The type of the query object
|
|
567
567
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
568
|
-
* @throws
|
|
569
|
-
*
|
|
570
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
568
|
+
* @throws Compile error
|
|
569
|
+
* @danger You must configure the generic argument `T`
|
|
571
570
|
*/
|
|
572
571
|
export declare function createAssertQuery(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
573
572
|
/**
|
|
574
573
|
* Creates a reusable {@link assertQuery} function.
|
|
575
574
|
*
|
|
575
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
576
576
|
* @template T The type of the query object
|
|
577
577
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
578
578
|
* @returns A reusable `assertQuery` function
|
|
579
|
-
*
|
|
580
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
581
579
|
*/
|
|
582
580
|
export declare function createAssertQuery<T extends object>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: string | IReadableURLSearchParams) => T;
|
|
583
581
|
/**
|
|
584
582
|
* Creates a reusable {@link isQuery} function.
|
|
585
583
|
*
|
|
586
|
-
* @danger You must configure the generic argument `T`
|
|
587
|
-
* @template T The type of the query object
|
|
588
|
-
* @throws compile error
|
|
589
|
-
*
|
|
590
584
|
* @author Jeongho Nam - https://github.com/samchon
|
|
585
|
+
* @template T The type of the query object
|
|
586
|
+
* @throws Compile error
|
|
587
|
+
* @danger You must configure the generic argument `T`
|
|
591
588
|
*/
|
|
592
589
|
export declare function createIsQuery(): never;
|
|
593
590
|
/**
|
|
594
591
|
* Creates a reusable {@link isQuery} function.
|
|
595
592
|
*
|
|
593
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
596
594
|
* @template T The type of the query object
|
|
597
595
|
* @returns A reusable `isQuery` function
|
|
598
|
-
*
|
|
599
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
600
596
|
*/
|
|
601
597
|
export declare function createIsQuery<T extends object>(): (input: string | IReadableURLSearchParams) => T | null;
|
|
602
598
|
/**
|
|
603
599
|
* Creates a reusable {@link validateQuery} function.
|
|
604
600
|
*
|
|
605
|
-
* @danger You must configure the generic argument `T`
|
|
606
|
-
* @template T The type of the query object
|
|
607
|
-
* @throws compile error
|
|
608
|
-
*
|
|
609
601
|
* @author Jeongho Nam - https://github.com/samchon
|
|
602
|
+
* @template T The type of the query object
|
|
603
|
+
* @throws Compile error
|
|
604
|
+
* @danger You must configure the generic argument `T`
|
|
610
605
|
*/
|
|
611
606
|
export declare function createValidateQuery(): never;
|
|
612
607
|
/**
|
|
613
608
|
* Creates a reusable {@link validateQuery} function.
|
|
614
609
|
*
|
|
610
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
615
611
|
* @template T The type of the query object
|
|
616
612
|
* @returns A reusable `validateQuery` function
|
|
617
|
-
*
|
|
618
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
619
613
|
*/
|
|
620
614
|
export declare function createValidateQuery<T extends object>(): (input: string | IReadableURLSearchParams) => IValidation<Resolved<T>>;
|
|
621
615
|
/**
|
|
622
616
|
* Creates a reusable {@link headers} function.
|
|
623
617
|
*
|
|
624
|
-
* @danger You must configure the generic argument `T`
|
|
625
|
-
* @template T The type of the headers object
|
|
626
|
-
* @throws compile error
|
|
627
|
-
*
|
|
628
618
|
* @author Jeongho Nam - https://github.com/samchon
|
|
619
|
+
* @template T The type of the headers object
|
|
620
|
+
* @throws Compile error
|
|
621
|
+
* @danger You must configure the generic argument `T`
|
|
629
622
|
*/
|
|
630
623
|
export declare function createHeaders(): never;
|
|
631
624
|
/**
|
|
632
625
|
* Creates a reusable {@link headers} function.
|
|
633
626
|
*
|
|
627
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
634
628
|
* @template T The type of the headers object
|
|
635
629
|
* @returns A reusable `headers` function
|
|
636
|
-
*
|
|
637
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
638
630
|
*/
|
|
639
631
|
export declare function createHeaders<T extends object>(): (input: Record<string, string | string[] | undefined>) => T;
|
|
640
632
|
/**
|
|
641
633
|
* Creates a reusable {@link assertHeaders} function.
|
|
642
634
|
*
|
|
643
|
-
* @
|
|
635
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
644
636
|
* @template T The type of the headers object
|
|
645
637
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
646
|
-
* @throws
|
|
647
|
-
*
|
|
648
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
638
|
+
* @throws Compile error
|
|
639
|
+
* @danger You must configure the generic argument `T`
|
|
649
640
|
*/
|
|
650
641
|
export declare function createAssertHeaders(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
651
642
|
/**
|
|
652
643
|
* Creates a reusable {@link assertHeaders} function.
|
|
653
644
|
*
|
|
645
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
654
646
|
* @template T The type of the headers object
|
|
655
647
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
656
648
|
* @returns A reusable `assertHeaders` function
|
|
657
|
-
*
|
|
658
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
659
649
|
*/
|
|
660
650
|
export declare function createAssertHeaders<T extends object>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: Record<string, string | string[] | undefined>) => T;
|
|
661
651
|
/**
|
|
662
652
|
* Creates a reusable {@link isHeaders} function.
|
|
663
653
|
*
|
|
664
|
-
* @danger You must configure the generic argument `T`
|
|
665
|
-
* @template T The type of the headers object
|
|
666
|
-
* @throws compile error
|
|
667
|
-
*
|
|
668
654
|
* @author Jeongho Nam - https://github.com/samchon
|
|
655
|
+
* @template T The type of the headers object
|
|
656
|
+
* @throws Compile error
|
|
657
|
+
* @danger You must configure the generic argument `T`
|
|
669
658
|
*/
|
|
670
659
|
export declare function createIsHeaders(): never;
|
|
671
660
|
/**
|
|
672
661
|
* Creates a reusable {@link isHeaders} function.
|
|
673
662
|
*
|
|
663
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
674
664
|
* @template T The type of the headers object
|
|
675
665
|
* @returns A reusable `isHeaders` function
|
|
676
|
-
*
|
|
677
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
678
666
|
*/
|
|
679
667
|
export declare function createIsHeaders<T extends object>(): (input: Record<string, string | string[] | undefined>) => T | null;
|
|
680
668
|
/**
|
|
681
669
|
* Creates a reusable {@link validateHeaders} function.
|
|
682
670
|
*
|
|
683
|
-
* @danger You must configure the generic argument `T`
|
|
684
|
-
* @template T The type of the headers object
|
|
685
|
-
* @throws compile error
|
|
686
|
-
*
|
|
687
671
|
* @author Jeongho Nam - https://github.com/samchon
|
|
672
|
+
* @template T The type of the headers object
|
|
673
|
+
* @throws Compile error
|
|
674
|
+
* @danger You must configure the generic argument `T`
|
|
688
675
|
*/
|
|
689
676
|
export declare function createValidateHeaders(): never;
|
|
690
677
|
/**
|
|
691
678
|
* Creates a reusable {@link validateHeaders} function.
|
|
692
679
|
*
|
|
680
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
693
681
|
* @template T The type of the headers object
|
|
694
682
|
* @returns A reusable `validateHeaders` function
|
|
695
|
-
*
|
|
696
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
697
683
|
*/
|
|
698
684
|
export declare function createValidateHeaders<T extends object>(): (input: Record<string, string | string[] | undefined>) => IValidation<Resolved<T>>;
|
|
699
685
|
/**
|
|
700
686
|
* Creates a reusable {@link parameter} function.
|
|
701
687
|
*
|
|
702
|
-
* @danger You must configure the generic argument `T`
|
|
703
|
-
* @template T The type of the parameter value
|
|
704
|
-
* @throws compile error
|
|
705
|
-
*
|
|
706
688
|
* @author Jeongho Nam - https://github.com/samchon
|
|
689
|
+
* @template T The type of the parameter value
|
|
690
|
+
* @throws Compile error
|
|
691
|
+
* @danger You must configure the generic argument `T`
|
|
707
692
|
*/
|
|
708
693
|
export declare function createParameter(): never;
|
|
709
694
|
/**
|
|
710
695
|
* Creates a reusable {@link parameter} function.
|
|
711
696
|
*
|
|
697
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
712
698
|
* @template T The type of the parameter value
|
|
713
699
|
* @returns A reusable `parameter` function
|
|
714
|
-
*
|
|
715
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
716
700
|
*/
|
|
717
701
|
export declare function createParameter<T extends Atomic.Type | null>(): (input: string) => T;
|