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/protobuf.d.ts
CHANGED
|
@@ -10,17 +10,18 @@ import { TypeGuardError } from "./TypeGuardError";
|
|
|
10
10
|
* schema would be returned as a string value, and it can be used to share with
|
|
11
11
|
* other developers/languages/frameworks.
|
|
12
12
|
*
|
|
13
|
-
* For reference, Protocol Buffer has lots of restrictions, so that expression
|
|
14
|
-
* of Protocol Buffer is not enough strong to fully meet the TypeScript
|
|
15
|
-
* In such reason, if you put a TypeScript type that is not
|
|
16
|
-
* Buffer, this function would throw compilation
|
|
13
|
+
* For reference, Protocol Buffer has lots of restrictions, so that expression
|
|
14
|
+
* power of Protocol Buffer is not enough strong to fully meet the TypeScript
|
|
15
|
+
* type specs. In such reason, if you put a TypeScript type that is not
|
|
16
|
+
* compatible with Protocol Buffer, this function would throw compilation
|
|
17
|
+
* errors.
|
|
17
18
|
*
|
|
18
|
-
*
|
|
19
|
+
* - [Restrictions of Protocol
|
|
20
|
+
* Buffer](https://typia.io/docs/protobuf/message/#restrictions)
|
|
19
21
|
*
|
|
22
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
20
23
|
* @template T Target type
|
|
21
24
|
* @returns Protocol Buffer Message Schema.
|
|
22
|
-
*
|
|
23
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
24
25
|
*/
|
|
25
26
|
export declare function message(): never;
|
|
26
27
|
/**
|
|
@@ -30,15 +31,15 @@ export declare function message(): never;
|
|
|
30
31
|
* schema would be returned as a string value, and it can be used to share with
|
|
31
32
|
* other developers/languages/frameworks.
|
|
32
33
|
*
|
|
33
|
-
* For reference, Protocol Buffer has lots of restrictions, so that expression
|
|
34
|
-
* of Protocol Buffer is not enough strong to fully meet the TypeScript
|
|
35
|
-
* In such reason, if you put a TypeScript type that is not
|
|
36
|
-
* Buffer, this function would throw compilation
|
|
34
|
+
* For reference, Protocol Buffer has lots of restrictions, so that expression
|
|
35
|
+
* power of Protocol Buffer is not enough strong to fully meet the TypeScript
|
|
36
|
+
* type specs. In such reason, if you put a TypeScript type that is not
|
|
37
|
+
* compatible with Protocol Buffer, this function would throw compilation
|
|
38
|
+
* errors.
|
|
37
39
|
*
|
|
40
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
38
41
|
* @template T Target type
|
|
39
42
|
* @returns Protocol Buffer Message Schema.
|
|
40
|
-
*
|
|
41
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
42
43
|
*/
|
|
43
44
|
export declare function message<T>(): string;
|
|
44
45
|
/**
|
|
@@ -46,59 +47,59 @@ export declare function message<T>(): string;
|
|
|
46
47
|
*
|
|
47
48
|
* Protocol Buffer Decoder.
|
|
48
49
|
*
|
|
49
|
-
* `typia.protobuf.decode()` is a function decoding a binary data of Protocol
|
|
50
|
-
* format to a TypeScript instance.
|
|
50
|
+
* `typia.protobuf.decode()` is a function decoding a binary data of Protocol
|
|
51
|
+
* Buffer format to a TypeScript instance.
|
|
51
52
|
*
|
|
52
|
-
* For reference, as Protocol Buffer handles binary data directly, there's no
|
|
53
|
-
* when `input` binary data was not encoded from the `T` typed value. In
|
|
54
|
-
* unexpected behavior or internal error would be occurred.
|
|
55
|
-
* to encode binary data of Protocol Buffer from type
|
|
56
|
-
* Use {@link encode} function only when you
|
|
53
|
+
* For reference, as Protocol Buffer handles binary data directly, there's no
|
|
54
|
+
* way when `input` binary data was not encoded from the `T` typed value. In
|
|
55
|
+
* that case, unexpected behavior or internal error would be occurred.
|
|
56
|
+
* Therefore, I recommend you to encode binary data of Protocol Buffer from type
|
|
57
|
+
* safe encode functions like below. Use {@link encode} function only when you
|
|
58
|
+
* can ensure it.
|
|
57
59
|
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
60
|
+
* - {@link assertEncode}
|
|
61
|
+
* - {@link isEncode}
|
|
62
|
+
* - {@link validateEncode}
|
|
61
63
|
*
|
|
62
|
-
* Also, `typia` is providing type safe decoders like {@link assertDecode}, but
|
|
63
|
-
* is just for additional type validation like `number & Minimum<7>` or
|
|
64
|
-
* `string & Format<"uuid">` cases, that are represented by
|
|
65
|
-
*
|
|
66
|
-
*
|
|
64
|
+
* Also, `typia` is providing type safe decoders like {@link assertDecode}, but
|
|
65
|
+
* it is just for additional type validation like `number & Minimum<7>` or
|
|
66
|
+
* `string & Format<"uuid">` cases, that are represented by [custom
|
|
67
|
+
* tags](https://typia.io/docs/validators/tags). Thus, I repeat that, you've to
|
|
68
|
+
* ensure the type safety when using decoder functions.
|
|
67
69
|
*
|
|
70
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
68
71
|
* @template T Expected type of decoded value
|
|
69
72
|
* @param input Protobuf Buffer binary data
|
|
70
73
|
* @returns Decoded value
|
|
71
|
-
*
|
|
72
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
73
74
|
*/
|
|
74
75
|
export declare function decode(input: Uint8Array): never;
|
|
75
76
|
/**
|
|
76
77
|
* Protocol Buffer Decoder.
|
|
77
78
|
*
|
|
78
|
-
* `typia.protobuf.decode()` is a function decoding a binary data of Protocol
|
|
79
|
-
* format to a TypeScript instance.
|
|
79
|
+
* `typia.protobuf.decode()` is a function decoding a binary data of Protocol
|
|
80
|
+
* Buffer format to a TypeScript instance.
|
|
80
81
|
*
|
|
81
|
-
* For reference, as Protocol Buffer handles binary data directly, there's no
|
|
82
|
-
* when `input` binary data was not encoded from the `T` typed value. In
|
|
83
|
-
* unexpected behavior or internal error would be occurred.
|
|
84
|
-
* to encode binary data of Protocol Buffer from type
|
|
85
|
-
* Use {@link encode} function only when you
|
|
82
|
+
* For reference, as Protocol Buffer handles binary data directly, there's no
|
|
83
|
+
* way when `input` binary data was not encoded from the `T` typed value. In
|
|
84
|
+
* that case, unexpected behavior or internal error would be occurred.
|
|
85
|
+
* Therefore, I recommend you to encode binary data of Protocol Buffer from type
|
|
86
|
+
* safe encode functions like below. Use {@link encode} function only when you
|
|
87
|
+
* can ensure it.
|
|
86
88
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
89
|
+
* - {@link assertEncode}
|
|
90
|
+
* - {@link isEncode}
|
|
91
|
+
* - {@link validateEncode}
|
|
90
92
|
*
|
|
91
|
-
* Also, `typia` is providing type safe decoders like {@link assertDecode}, but
|
|
92
|
-
* is just for additional type validation like `number & Minimum<7>` or
|
|
93
|
-
* `string & Format<"uuid">` cases, that are represented by
|
|
94
|
-
*
|
|
95
|
-
*
|
|
93
|
+
* Also, `typia` is providing type safe decoders like {@link assertDecode}, but
|
|
94
|
+
* it is just for additional type validation like `number & Minimum<7>` or
|
|
95
|
+
* `string & Format<"uuid">` cases, that are represented by [custom
|
|
96
|
+
* tags](https://typia.io/docs/validators/tags). Thus, I repeat that, you've to
|
|
97
|
+
* ensure the type safety when using decoder functions.
|
|
96
98
|
*
|
|
99
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
97
100
|
* @template T Expected type of decoded value
|
|
98
101
|
* @param input Protobuf Buffer binary data
|
|
99
102
|
* @returns Decoded value
|
|
100
|
-
*
|
|
101
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
102
103
|
*/
|
|
103
104
|
export declare function decode<T>(input: Uint8Array): Resolved<T>;
|
|
104
105
|
/**
|
|
@@ -106,59 +107,61 @@ export declare function decode<T>(input: Uint8Array): Resolved<T>;
|
|
|
106
107
|
*
|
|
107
108
|
* Protocol Buffer Decoder wity type assertion, but not safe.
|
|
108
109
|
*
|
|
109
|
-
* `typia.protobuf.assertDecode()` is a combination function of {@link decode}
|
|
110
|
-
* {@link assert} function. Therefore, it decodes a binary data of Protocol
|
|
111
|
-
* a TypeScript instance, and performs type assertion process. If
|
|
112
|
-
* following the type `T`, it returns the decoded value.
|
|
113
|
-
* {@link TypeGuardError} instead.
|
|
110
|
+
* `typia.protobuf.assertDecode()` is a combination function of {@link decode}
|
|
111
|
+
* and {@link assert} function. Therefore, it decodes a binary data of Protocol
|
|
112
|
+
* Buffer to a TypeScript instance, and performs type assertion process. If
|
|
113
|
+
* decoded value is following the type `T`, it returns the decoded value.
|
|
114
|
+
* Otherwise, it throws {@link TypeGuardError} instead.
|
|
114
115
|
*
|
|
115
|
-
* However, note that, this validation is not always safe. It just performs
|
|
116
|
-
* type assertion like `number & Minimum<7>` or `string &
|
|
117
|
-
* that are represented by [custom
|
|
118
|
-
*
|
|
119
|
-
* ensure the type
|
|
116
|
+
* However, note that, this validation is not always safe. It just performs
|
|
117
|
+
* additional type assertion like `number & Minimum<7>` or `string &
|
|
118
|
+
* Format<"uuid">` cases, that are represented by [custom
|
|
119
|
+
* tags](https://typia.io/docs/validators/tags). Therefore, when using
|
|
120
|
+
* `typia.protobuf.assertDecode<T>()` function, you have to ensure the type
|
|
121
|
+
* safety by yourself.
|
|
120
122
|
*
|
|
121
|
-
* In such type safety reason, I recommend you to use type safe encode
|
|
123
|
+
* In such type safety reason, I recommend you to use type safe encode
|
|
124
|
+
* functions.
|
|
122
125
|
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
+
* - {@link assertEncode}
|
|
127
|
+
* - {@link isEncode}
|
|
128
|
+
* - {@link validateEncode}
|
|
126
129
|
*
|
|
130
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
127
131
|
* @template T Expected type of decoded value
|
|
128
132
|
* @param input Protobuf Buffer binary data
|
|
129
133
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
130
134
|
* @returns Decoded value
|
|
131
|
-
*
|
|
132
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
133
135
|
*/
|
|
134
136
|
export declare function assertDecode(input: Uint8Array, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
135
137
|
/**
|
|
136
138
|
* Protocol Buffer Decoder wity type assertion, but not safe.
|
|
137
139
|
*
|
|
138
|
-
* `typia.protobuf.assertDecode()` is a combination function of {@link decode}
|
|
139
|
-
* {@link assert} function. Therefore, it decodes a binary data of Protocol
|
|
140
|
-
* a TypeScript instance, and performs type assertion process. If
|
|
141
|
-
* following the type `T`, it returns the decoded value.
|
|
142
|
-
* {@link TypeGuardError} instead.
|
|
140
|
+
* `typia.protobuf.assertDecode()` is a combination function of {@link decode}
|
|
141
|
+
* and {@link assert} function. Therefore, it decodes a binary data of Protocol
|
|
142
|
+
* Buffer to a TypeScript instance, and performs type assertion process. If
|
|
143
|
+
* decoded value is following the type `T`, it returns the decoded value.
|
|
144
|
+
* Otherwise, it throws {@link TypeGuardError} instead.
|
|
143
145
|
*
|
|
144
|
-
* However, note that, this validation is not always safe. It just performs
|
|
145
|
-
* type assertion like `number & Minimum<7>` or `string &
|
|
146
|
-
* that are represented by [custom
|
|
147
|
-
*
|
|
148
|
-
* ensure the type
|
|
146
|
+
* However, note that, this validation is not always safe. It just performs
|
|
147
|
+
* additional type assertion like `number & Minimum<7>` or `string &
|
|
148
|
+
* Format<"uuid">` cases, that are represented by [custom
|
|
149
|
+
* tags](https://typia.io/docs/validators/tags). Therefore, when using
|
|
150
|
+
* `typia.protobuf.assertDecode<T>()` function, you have to ensure the type
|
|
151
|
+
* safety by yourself.
|
|
149
152
|
*
|
|
150
|
-
* In such type safety reason, I recommend you to use type safe encode
|
|
153
|
+
* In such type safety reason, I recommend you to use type safe encode
|
|
154
|
+
* functions.
|
|
151
155
|
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
156
|
+
* - {@link assertEncode}
|
|
157
|
+
* - {@link isEncode}
|
|
158
|
+
* - {@link validateEncode}
|
|
155
159
|
*
|
|
160
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
156
161
|
* @template T Expected type of decoded value
|
|
157
162
|
* @param input Protobuf Buffer binary data
|
|
158
163
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
159
164
|
* @returns Decoded value
|
|
160
|
-
*
|
|
161
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
162
165
|
*/
|
|
163
166
|
export declare function assertDecode<T>(input: Uint8Array, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Resolved<T>;
|
|
164
167
|
/**
|
|
@@ -168,27 +171,28 @@ export declare function assertDecode<T>(input: Uint8Array, errorFactory?: undefi
|
|
|
168
171
|
*
|
|
169
172
|
* `typia.protobuf.isDecode()` is a combination function of {@link decode} and
|
|
170
173
|
* {@link is} function. Therefore, it decodes a binary data of Protocol Buffer to
|
|
171
|
-
* a TypeScript instance, and performs type checking process. If decoded value
|
|
172
|
-
* following the type `T`, it returns the decoded value. Otherwise, it
|
|
173
|
-
* `null` value instead.
|
|
174
|
+
* a TypeScript instance, and performs type checking process. If decoded value
|
|
175
|
+
* is following the type `T`, it returns the decoded value. Otherwise, it
|
|
176
|
+
* returns `null` value instead.
|
|
174
177
|
*
|
|
175
|
-
* However, note that, this validation is not always safe. It just performs
|
|
176
|
-
* type checking like `number & Minimum<7>` or `string &
|
|
177
|
-
* that are represented by [custom
|
|
178
|
-
*
|
|
179
|
-
* ensure the type safety
|
|
178
|
+
* However, note that, this validation is not always safe. It just performs
|
|
179
|
+
* additional type checking like `number & Minimum<7>` or `string &
|
|
180
|
+
* Format<"uuid">` cases, that are represented by [custom
|
|
181
|
+
* tags](https://typia.io/docs/validators/tags). Therefore, when using
|
|
182
|
+
* `typia.protobuf.isDecode<T>()` function, you have to ensure the type safety
|
|
183
|
+
* by yourself.
|
|
180
184
|
*
|
|
181
|
-
* In such type safety reason, I recommend you to use type safe encode
|
|
185
|
+
* In such type safety reason, I recommend you to use type safe encode
|
|
186
|
+
* functions.
|
|
182
187
|
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
188
|
+
* - {@link assertEncode}
|
|
189
|
+
* - {@link isEncode}
|
|
190
|
+
* - {@link validateEncode}
|
|
186
191
|
*
|
|
192
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
187
193
|
* @template T Expected type of decoded value
|
|
188
194
|
* @param input Protobuf Buffer binary data
|
|
189
195
|
* @returns Decoded value
|
|
190
|
-
*
|
|
191
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
192
196
|
*/
|
|
193
197
|
export declare function isDecode(input: Uint8Array): never;
|
|
194
198
|
/**
|
|
@@ -196,27 +200,28 @@ export declare function isDecode(input: Uint8Array): never;
|
|
|
196
200
|
*
|
|
197
201
|
* `typia.protobuf.isDecode()` is a combination function of {@link decode} and
|
|
198
202
|
* {@link is} function. Therefore, it decodes a binary data of Protocol Buffer to
|
|
199
|
-
* a TypeScript instance, and performs type checking process. If decoded value
|
|
200
|
-
* following the type `T`, it returns the decoded value. Otherwise, it
|
|
201
|
-
* `null` value instead.
|
|
203
|
+
* a TypeScript instance, and performs type checking process. If decoded value
|
|
204
|
+
* is following the type `T`, it returns the decoded value. Otherwise, it
|
|
205
|
+
* returns `null` value instead.
|
|
202
206
|
*
|
|
203
|
-
* However, note that, this validation is not always safe. It just performs
|
|
204
|
-
* type checking like `number & Minimum<7>` or `string &
|
|
205
|
-
* that are represented by [custom
|
|
206
|
-
*
|
|
207
|
-
* ensure the type safety
|
|
207
|
+
* However, note that, this validation is not always safe. It just performs
|
|
208
|
+
* additional type checking like `number & Minimum<7>` or `string &
|
|
209
|
+
* Format<"uuid">` cases, that are represented by [custom
|
|
210
|
+
* tags](https://typia.io/docs/validators/tags). Therefore, when using
|
|
211
|
+
* `typia.protobuf.isDecode<T>()` function, you have to ensure the type safety
|
|
212
|
+
* by yourself.
|
|
208
213
|
*
|
|
209
|
-
* In such type safety reason, I recommend you to use type safe encode
|
|
214
|
+
* In such type safety reason, I recommend you to use type safe encode
|
|
215
|
+
* functions.
|
|
210
216
|
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
217
|
+
* - {@link assertEncode}
|
|
218
|
+
* - {@link isEncode}
|
|
219
|
+
* - {@link validateEncode}
|
|
214
220
|
*
|
|
221
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
215
222
|
* @template T Expected type of decoded value
|
|
216
223
|
* @param input Protobuf Buffer binary data
|
|
217
224
|
* @returns Decoded value
|
|
218
|
-
*
|
|
219
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
220
225
|
*/
|
|
221
226
|
export declare function isDecode<T>(input: Uint8Array): Resolved<T> | null;
|
|
222
227
|
/**
|
|
@@ -224,59 +229,61 @@ export declare function isDecode<T>(input: Uint8Array): Resolved<T> | null;
|
|
|
224
229
|
*
|
|
225
230
|
* Protocol Buffer Decoder wity type validation, but not safe.
|
|
226
231
|
*
|
|
227
|
-
* `typia.protobuf.validateDecode()` is a combination function of {@link decode}
|
|
228
|
-
* {@link validate} function. Therefore, it decodes a binary data of Protocol
|
|
229
|
-
* a TypeScript instance, and performs type validation process. If
|
|
230
|
-
* following the type `T`, it returns the decoded value with
|
|
232
|
+
* `typia.protobuf.validateDecode()` is a combination function of {@link decode}
|
|
233
|
+
* and {@link validate} function. Therefore, it decodes a binary data of Protocol
|
|
234
|
+
* Buffer to a TypeScript instance, and performs type validation process. If
|
|
235
|
+
* decoded value is following the type `T`, it returns the decoded value with
|
|
231
236
|
* {@link IValidation.ISuccess} typed instance. Otherwise, it returns
|
|
232
237
|
* {@link IValidation.IFailure} value instead with detailed error reasons.
|
|
233
238
|
*
|
|
234
|
-
* However, note that, this validation is not always safe. It just performs
|
|
235
|
-
* type validation like `number & Minimum<7>` or `string &
|
|
236
|
-
* that are represented by [custom
|
|
237
|
-
*
|
|
238
|
-
* ensure the type
|
|
239
|
+
* However, note that, this validation is not always safe. It just performs
|
|
240
|
+
* additional type validation like `number & Minimum<7>` or `string &
|
|
241
|
+
* Format<"uuid">` cases, that are represented by [custom
|
|
242
|
+
* tags](https://typia.io/docs/validators/tags). Therefore, when using
|
|
243
|
+
* `typia.protobuf.validateDecode<T>()` function, you have to ensure the type
|
|
244
|
+
* safety by yourself.
|
|
239
245
|
*
|
|
240
|
-
* In such type safety reason, I recommend you to use type safe encode
|
|
246
|
+
* In such type safety reason, I recommend you to use type safe encode
|
|
247
|
+
* functions.
|
|
241
248
|
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
249
|
+
* - {@link assertEncode}
|
|
250
|
+
* - {@link isEncode}
|
|
251
|
+
* - {@link validateEncode}
|
|
245
252
|
*
|
|
253
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
246
254
|
* @template T Expected type of decoded value
|
|
247
255
|
* @param input Protobuf Buffer binary data
|
|
248
256
|
* @returns Decoded value
|
|
249
|
-
*
|
|
250
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
251
257
|
*/
|
|
252
258
|
export declare function validateDecode(input: Uint8Array): never;
|
|
253
259
|
/**
|
|
254
260
|
* Protocol Buffer Decoder wity type validation, but not safe.
|
|
255
261
|
*
|
|
256
|
-
* `typia.protobuf.validateDecode()` is a combination function of {@link decode}
|
|
257
|
-
* {@link validate} function. Therefore, it decodes a binary data of Protocol
|
|
258
|
-
* a TypeScript instance, and performs type validation process. If
|
|
259
|
-
* following the type `T`, it returns the decoded value with
|
|
262
|
+
* `typia.protobuf.validateDecode()` is a combination function of {@link decode}
|
|
263
|
+
* and {@link validate} function. Therefore, it decodes a binary data of Protocol
|
|
264
|
+
* Buffer to a TypeScript instance, and performs type validation process. If
|
|
265
|
+
* decoded value is following the type `T`, it returns the decoded value with
|
|
260
266
|
* {@link IValidation.ISuccess} typed instance. Otherwise, it returns
|
|
261
267
|
* {@link IValidation.IFailure} value instead with detailed error reasons.
|
|
262
268
|
*
|
|
263
|
-
* However, note that, this validation is not always safe. It just performs
|
|
264
|
-
* type validation like `number & Minimum<7>` or `string &
|
|
265
|
-
* that are represented by [custom
|
|
266
|
-
*
|
|
267
|
-
* ensure the type
|
|
269
|
+
* However, note that, this validation is not always safe. It just performs
|
|
270
|
+
* additional type validation like `number & Minimum<7>` or `string &
|
|
271
|
+
* Format<"uuid">` cases, that are represented by [custom
|
|
272
|
+
* tags](https://typia.io/docs/validators/tags). Therefore, when using
|
|
273
|
+
* `typia.protobuf.validateDecode<T>()` function, you have to ensure the type
|
|
274
|
+
* safety by yourself.
|
|
268
275
|
*
|
|
269
|
-
* In such type safety reason, I recommend you to use type safe encode
|
|
276
|
+
* In such type safety reason, I recommend you to use type safe encode
|
|
277
|
+
* functions.
|
|
270
278
|
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
279
|
+
* - {@link assertEncode}
|
|
280
|
+
* - {@link isEncode}
|
|
281
|
+
* - {@link validateEncode}
|
|
274
282
|
*
|
|
283
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
275
284
|
* @template T Expected type of decoded value
|
|
276
285
|
* @param input Protobuf Buffer binary data
|
|
277
286
|
* @returns Decoded value
|
|
278
|
-
*
|
|
279
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
280
287
|
*/
|
|
281
288
|
export declare function validateDecode<T>(input: Uint8Array): IValidation<Resolved<T>>;
|
|
282
289
|
/**
|
|
@@ -284,93 +291,93 @@ export declare function validateDecode<T>(input: Uint8Array): IValidation<Resolv
|
|
|
284
291
|
*
|
|
285
292
|
* Converts an input value to a binary data of Protocol Buffer format.
|
|
286
293
|
*
|
|
287
|
-
* For reference, this `typia.protobuf.encode()` does not validate the `input`
|
|
288
|
-
* It just believes that the `input` value is valid and converts it to a
|
|
289
|
-
* directly. Therefore, if you can't ensure the `input` value type,
|
|
290
|
-
* call one of below functions instead.
|
|
294
|
+
* For reference, this `typia.protobuf.encode()` does not validate the `input`
|
|
295
|
+
* value. It just believes that the `input` value is valid and converts it to a
|
|
296
|
+
* binary data directly. Therefore, if you can't ensure the `input` value type,
|
|
297
|
+
* it would better to call one of below functions instead.
|
|
291
298
|
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
*
|
|
299
|
+
* - {@link assertEncode}
|
|
300
|
+
* - {@link isEncode}
|
|
301
|
+
* - {@link validateEncode}
|
|
295
302
|
*
|
|
296
|
-
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
297
|
-
* to fully meet the TypeScript type specs. In such reason, if you put a
|
|
298
|
-
* type that is not compatible with Protocol Buffer, this function
|
|
299
|
-
* compilation errors.
|
|
303
|
+
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
304
|
+
* strong to fully meet the TypeScript type specs. In such reason, if you put a
|
|
305
|
+
* TypeScript type that is not compatible with Protocol Buffer, this function
|
|
306
|
+
* would throw compilation errors.
|
|
300
307
|
*
|
|
301
|
-
*
|
|
308
|
+
* - [Restrictions of Protocol
|
|
309
|
+
* Buffer](https://typia.io/docs/protobuf/message/#restrictions)
|
|
302
310
|
*
|
|
311
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
303
312
|
* @template T Type of the value input
|
|
304
313
|
* @param input A value to encode
|
|
305
314
|
* @returns Encoded binary data
|
|
306
|
-
*
|
|
307
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
308
315
|
*/
|
|
309
316
|
export declare function encode<T>(input: T): Uint8Array;
|
|
310
317
|
/**
|
|
311
318
|
* Protocol Buffer Encoder with type assertion.
|
|
312
319
|
*
|
|
313
|
-
* `typia.protobuf.assertEncode()` is a combination function of {@link assert}
|
|
314
|
-
* {@link encode}.
|
|
320
|
+
* `typia.protobuf.assertEncode()` is a combination function of {@link assert}
|
|
321
|
+
* and {@link encode}.
|
|
315
322
|
*
|
|
316
|
-
* Therefore, it converts an `input` value to a binary data of
|
|
317
|
-
*
|
|
323
|
+
* Therefore, it converts an `input` value to a binary data of Protocol Buffer,
|
|
324
|
+
* with type assertion. If `input` value is not valid, it throws
|
|
318
325
|
* {@link TypeGuardError}. Otherwise, there's no problem on the `input` value,
|
|
319
326
|
* Protocol Buffer binary data would be returned.
|
|
320
327
|
*
|
|
321
|
-
* If you can trust `input` value, or want to perform other type of validation,
|
|
322
|
-
* below functions instead.
|
|
328
|
+
* If you can trust `input` value, or want to perform other type of validation,
|
|
329
|
+
* use below functions instead.
|
|
323
330
|
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
*
|
|
331
|
+
* - {@link encode}
|
|
332
|
+
* - {@link isEncode}
|
|
333
|
+
* - {@link validateEncode}
|
|
327
334
|
*
|
|
328
|
-
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
329
|
-
* to fully meet the TypeScript type specs. In such reason, if you put a
|
|
330
|
-
* type that is not compatible with Protocol Buffer, this function
|
|
331
|
-
* compilation errors.
|
|
335
|
+
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
336
|
+
* strong to fully meet the TypeScript type specs. In such reason, if you put a
|
|
337
|
+
* TypeScript type that is not compatible with Protocol Buffer, this function
|
|
338
|
+
* would throw compilation errors.
|
|
332
339
|
*
|
|
333
|
-
*
|
|
340
|
+
* - [Restrictions of Protocol
|
|
341
|
+
* Buffer](https://typia.io/docs/protobuf/message/#restrictions)
|
|
334
342
|
*
|
|
343
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
335
344
|
* @template T Type of the value input
|
|
336
345
|
* @param input A value to encode
|
|
337
346
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
338
347
|
* @returns Encoded binary data
|
|
339
|
-
*
|
|
340
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
341
348
|
*/
|
|
342
349
|
export declare function assertEncode<T>(input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Uint8Array;
|
|
343
350
|
/**
|
|
344
351
|
* Protocol Buffer Encoder with type assertion.
|
|
345
352
|
*
|
|
346
|
-
* `typia.protobuf.assertEncode()` is a combination function of {@link assert}
|
|
347
|
-
* {@link encode}.
|
|
353
|
+
* `typia.protobuf.assertEncode()` is a combination function of {@link assert}
|
|
354
|
+
* and {@link encode}.
|
|
348
355
|
*
|
|
349
|
-
* Therefore, it converts an `input` value to a binary data of
|
|
350
|
-
*
|
|
356
|
+
* Therefore, it converts an `input` value to a binary data of Protocol Buffer,
|
|
357
|
+
* with type assertion. If `input` value is not valid, it throws
|
|
351
358
|
* {@link TypeGuardError}. Otherwise, there's no problem on the `input` value,
|
|
352
359
|
* Protocol Buffer binary data would be returned.
|
|
353
360
|
*
|
|
354
|
-
* If you can trust `input` value, or want to perform other type of validation,
|
|
355
|
-
* below functions instead.
|
|
361
|
+
* If you can trust `input` value, or want to perform other type of validation,
|
|
362
|
+
* use below functions instead.
|
|
356
363
|
*
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
*
|
|
364
|
+
* - {@link encode}
|
|
365
|
+
* - {@link isEncode}
|
|
366
|
+
* - {@link validateEncode}
|
|
360
367
|
*
|
|
361
|
-
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
362
|
-
* to fully meet the TypeScript type specs. In such reason, if you put a
|
|
363
|
-
* type that is not compatible with Protocol Buffer, this function
|
|
364
|
-
* compilation errors.
|
|
368
|
+
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
369
|
+
* strong to fully meet the TypeScript type specs. In such reason, if you put a
|
|
370
|
+
* TypeScript type that is not compatible with Protocol Buffer, this function
|
|
371
|
+
* would throw compilation errors.
|
|
365
372
|
*
|
|
366
|
-
*
|
|
373
|
+
* - [Restrictions of Protocol
|
|
374
|
+
* Buffer](https://typia.io/docs/protobuf/message/#restrictions)
|
|
367
375
|
*
|
|
376
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
368
377
|
* @template T Type of the value input
|
|
369
378
|
* @param input A value to encode
|
|
370
379
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
371
380
|
* @returns Encoded binary data
|
|
372
|
-
*
|
|
373
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
374
381
|
*/
|
|
375
382
|
export declare function assertEncode<T>(input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Uint8Array;
|
|
376
383
|
/**
|
|
@@ -379,30 +386,30 @@ export declare function assertEncode<T>(input: unknown, errorFactory?: undefined
|
|
|
379
386
|
* `typia.protobuf.isEncode()` is a combination function of {@link is} and
|
|
380
387
|
* {@link encode}.
|
|
381
388
|
*
|
|
382
|
-
* Therefore, it converts an `input` value to a binary data of
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
389
|
+
* Therefore, it converts an `input` value to a binary data of Protocol Buffer,
|
|
390
|
+
* with type checking. If `input` value is not valid, it returns `null` value.
|
|
391
|
+
* Otherwise, there's no problem on the `input` value, Protocol Buffer binary
|
|
392
|
+
* data would be returned.
|
|
386
393
|
*
|
|
387
|
-
* If you can trust `input` value, or want to perform other type of validation,
|
|
388
|
-
* below functions instead.
|
|
394
|
+
* If you can trust `input` value, or want to perform other type of validation,
|
|
395
|
+
* use below functions instead.
|
|
389
396
|
*
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
397
|
+
* - {@link encode}
|
|
398
|
+
* - {@link assertEncode}
|
|
399
|
+
* - {@link validateEncode}
|
|
393
400
|
*
|
|
394
|
-
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
395
|
-
* to fully meet the TypeScript type specs. In such reason, if you put a
|
|
396
|
-
* type that is not compatible with Protocol Buffer, this function
|
|
397
|
-
* compilation errors.
|
|
401
|
+
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
402
|
+
* strong to fully meet the TypeScript type specs. In such reason, if you put a
|
|
403
|
+
* TypeScript type that is not compatible with Protocol Buffer, this function
|
|
404
|
+
* would throw compilation errors.
|
|
398
405
|
*
|
|
399
|
-
*
|
|
406
|
+
* - [Restrictions of Protocol
|
|
407
|
+
* Buffer](https://typia.io/docs/protobuf/message/#restrictions)
|
|
400
408
|
*
|
|
409
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
401
410
|
* @template T Type of the value input
|
|
402
411
|
* @param input A value to encode
|
|
403
412
|
* @returns Encoded binary data
|
|
404
|
-
*
|
|
405
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
406
413
|
*/
|
|
407
414
|
export declare function isEncode<T>(input: T): Uint8Array | null;
|
|
408
415
|
/**
|
|
@@ -411,30 +418,30 @@ export declare function isEncode<T>(input: T): Uint8Array | null;
|
|
|
411
418
|
* `typia.protobuf.isEncode()` is a combination function of {@link is} and
|
|
412
419
|
* {@link encode}.
|
|
413
420
|
*
|
|
414
|
-
* Therefore, it converts an `input` value to a binary data of
|
|
415
|
-
*
|
|
416
|
-
*
|
|
417
|
-
*
|
|
421
|
+
* Therefore, it converts an `input` value to a binary data of Protocol Buffer,
|
|
422
|
+
* with type checking. If `input` value is not valid, it returns `null` value.
|
|
423
|
+
* Otherwise, there's no problem on the `input` value, Protocol Buffer binary
|
|
424
|
+
* data would be returned.
|
|
418
425
|
*
|
|
419
|
-
* If you can trust `input` value, or want to perform other type of validation,
|
|
420
|
-
* below functions instead.
|
|
426
|
+
* If you can trust `input` value, or want to perform other type of validation,
|
|
427
|
+
* use below functions instead.
|
|
421
428
|
*
|
|
422
|
-
*
|
|
423
|
-
*
|
|
424
|
-
*
|
|
429
|
+
* - {@link encode}
|
|
430
|
+
* - {@link assertEncode}
|
|
431
|
+
* - {@link validateEncode}
|
|
425
432
|
*
|
|
426
|
-
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
427
|
-
* to fully meet the TypeScript type specs. In such reason, if you put a
|
|
428
|
-
* type that is not compatible with Protocol Buffer, this function
|
|
429
|
-
* compilation errors.
|
|
433
|
+
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
434
|
+
* strong to fully meet the TypeScript type specs. In such reason, if you put a
|
|
435
|
+
* TypeScript type that is not compatible with Protocol Buffer, this function
|
|
436
|
+
* would throw compilation errors.
|
|
430
437
|
*
|
|
431
|
-
*
|
|
438
|
+
* - [Restrictions of Protocol
|
|
439
|
+
* Buffer](https://typia.io/docs/protobuf/message/#restrictions)
|
|
432
440
|
*
|
|
441
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
433
442
|
* @template T Type of the value input
|
|
434
443
|
* @param input A value to encode
|
|
435
444
|
* @returns Encoded binary data
|
|
436
|
-
*
|
|
437
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
438
445
|
*/
|
|
439
446
|
export declare function isEncode<T>(input: unknown): Uint8Array | null;
|
|
440
447
|
/**
|
|
@@ -443,31 +450,32 @@ export declare function isEncode<T>(input: unknown): Uint8Array | null;
|
|
|
443
450
|
* `typia.protobuf.validateEncode()` is a combination function of
|
|
444
451
|
* {@link validation} and {@link encode}.
|
|
445
452
|
*
|
|
446
|
-
* Therefore, it converts an `input` value to a binary data of
|
|
447
|
-
*
|
|
448
|
-
* {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
|
|
449
|
-
* no problem on the `input` value, Protocol Buffer binary data would be
|
|
450
|
-
* `data` property of the output {@link IValidation.ISuccess}
|
|
453
|
+
* Therefore, it converts an `input` value to a binary data of Protocol Buffer,
|
|
454
|
+
* with type validation. If `input` value is not valid, it returns
|
|
455
|
+
* {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
|
|
456
|
+
* there's no problem on the `input` value, Protocol Buffer binary data would be
|
|
457
|
+
* stored in `data` property of the output {@link IValidation.ISuccess}
|
|
458
|
+
* instance.
|
|
451
459
|
*
|
|
452
|
-
* If you can trust `input` value, or want to perform other type of validation,
|
|
453
|
-
* below functions instead.
|
|
460
|
+
* If you can trust `input` value, or want to perform other type of validation,
|
|
461
|
+
* use below functions instead.
|
|
454
462
|
*
|
|
455
|
-
*
|
|
456
|
-
*
|
|
457
|
-
*
|
|
463
|
+
* - {@link encode}
|
|
464
|
+
* - {@link assertEncode}
|
|
465
|
+
* - {@link isEncode}
|
|
458
466
|
*
|
|
459
|
-
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
460
|
-
* to fully meet the TypeScript type specs. In such reason, if you put a
|
|
461
|
-
* type that is not compatible with Protocol Buffer, this function
|
|
462
|
-
* compilation errors.
|
|
467
|
+
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
468
|
+
* strong to fully meet the TypeScript type specs. In such reason, if you put a
|
|
469
|
+
* TypeScript type that is not compatible with Protocol Buffer, this function
|
|
470
|
+
* would throw compilation errors.
|
|
463
471
|
*
|
|
464
|
-
*
|
|
472
|
+
* - [Restrictions of Protocol
|
|
473
|
+
* Buffer](https://typia.io/docs/protobuf/message/#restrictions)
|
|
465
474
|
*
|
|
475
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
466
476
|
* @template T Type of the value input
|
|
467
477
|
* @param input A value to encode
|
|
468
478
|
* @returns Encoded binary data
|
|
469
|
-
*
|
|
470
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
471
479
|
*/
|
|
472
480
|
export declare function validateEncode<T>(input: T): IValidation<Uint8Array>;
|
|
473
481
|
/**
|
|
@@ -476,186 +484,171 @@ export declare function validateEncode<T>(input: T): IValidation<Uint8Array>;
|
|
|
476
484
|
* `typia.protobuf.validateEncode()` is a combination function of
|
|
477
485
|
* {@link validation} and {@link encode}.
|
|
478
486
|
*
|
|
479
|
-
* Therefore, it converts an `input` value to a binary data of
|
|
480
|
-
*
|
|
481
|
-
* {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
|
|
482
|
-
* no problem on the `input` value, Protocol Buffer binary data would be
|
|
483
|
-
* `data` property of the output {@link IValidation.ISuccess}
|
|
487
|
+
* Therefore, it converts an `input` value to a binary data of Protocol Buffer,
|
|
488
|
+
* with type validation. If `input` value is not valid, it returns
|
|
489
|
+
* {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
|
|
490
|
+
* there's no problem on the `input` value, Protocol Buffer binary data would be
|
|
491
|
+
* stored in `data` property of the output {@link IValidation.ISuccess}
|
|
492
|
+
* instance.
|
|
484
493
|
*
|
|
485
|
-
* If you can trust `input` value, or want to perform other type of validation,
|
|
486
|
-
* below functions instead.
|
|
494
|
+
* If you can trust `input` value, or want to perform other type of validation,
|
|
495
|
+
* use below functions instead.
|
|
487
496
|
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
490
|
-
*
|
|
497
|
+
* - {@link encode}
|
|
498
|
+
* - {@link assertEncode}
|
|
499
|
+
* - {@link isEncode}
|
|
491
500
|
*
|
|
492
|
-
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
493
|
-
* to fully meet the TypeScript type specs. In such reason, if you put a
|
|
494
|
-
* type that is not compatible with Protocol Buffer, this function
|
|
495
|
-
* compilation errors.
|
|
501
|
+
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
502
|
+
* strong to fully meet the TypeScript type specs. In such reason, if you put a
|
|
503
|
+
* TypeScript type that is not compatible with Protocol Buffer, this function
|
|
504
|
+
* would throw compilation errors.
|
|
496
505
|
*
|
|
497
|
-
*
|
|
506
|
+
* - [Restrictions of Protocol
|
|
507
|
+
* Buffer](https://typia.io/docs/protobuf/message/#restrictions)
|
|
498
508
|
*
|
|
509
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
499
510
|
* @template T Type of the value input
|
|
500
511
|
* @param input A value to encode
|
|
501
512
|
* @returns Encoded binary data
|
|
502
|
-
*
|
|
503
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
504
513
|
*/
|
|
505
514
|
export declare function validateEncode<T>(input: unknown): IValidation<Uint8Array>;
|
|
506
515
|
/**
|
|
507
516
|
* Creates a reusable {@link decode} function.
|
|
508
517
|
*
|
|
509
|
-
* @danger You must configure the generic argument `T`
|
|
510
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
511
|
-
* @throws compile error
|
|
512
|
-
*
|
|
513
518
|
* @author Jeongho Nam - https://github.com/samchon
|
|
519
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
520
|
+
* @throws Compile error
|
|
521
|
+
* @danger You must configure the generic argument `T`
|
|
514
522
|
*/
|
|
515
523
|
export declare function createDecode(): never;
|
|
516
524
|
/**
|
|
517
525
|
* Creates a reusable {@link decode} function.
|
|
518
526
|
*
|
|
527
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
519
528
|
* @template T Target type
|
|
520
529
|
* @returns A reusable `decode` function
|
|
521
|
-
*
|
|
522
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
523
530
|
*/
|
|
524
531
|
export declare function createDecode<T>(): (input: Uint8Array) => Resolved<T>;
|
|
525
532
|
/**
|
|
526
533
|
* Creates a reusable {@link isDecode} function.
|
|
527
534
|
*
|
|
528
|
-
* @danger You must configure the generic argument `T`
|
|
529
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
530
|
-
* @throws compile error
|
|
531
|
-
*
|
|
532
535
|
* @author Jeongho Nam - https://github.com/samchon
|
|
536
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
537
|
+
* @throws Compile error
|
|
538
|
+
* @danger You must configure the generic argument `T`
|
|
533
539
|
*/
|
|
534
540
|
export declare function createIsDecode(): never;
|
|
535
541
|
/**
|
|
536
542
|
* Creates a reusable {@link isDecode} function.
|
|
537
543
|
*
|
|
544
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
538
545
|
* @template T Target type
|
|
539
546
|
* @returns A reusable `isDecode` function
|
|
540
|
-
*
|
|
541
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
542
547
|
*/
|
|
543
548
|
export declare function createIsDecode<T>(): (input: Uint8Array) => Resolved<T> | null;
|
|
544
549
|
/**
|
|
545
550
|
* Creates a reusable {@link assertDecode} function.
|
|
546
551
|
*
|
|
547
|
-
* @
|
|
552
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
548
553
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
549
554
|
* @returns Nothing until you configure the generic argument `T`
|
|
550
|
-
* @throws
|
|
551
|
-
*
|
|
552
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
555
|
+
* @throws Compile error
|
|
556
|
+
* @danger You must configure the generic argument `T`
|
|
553
557
|
*/
|
|
554
558
|
export declare function createAssertDecode(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
555
559
|
/**
|
|
556
560
|
* Creates a reusable {@link assertDecode} function.
|
|
557
561
|
*
|
|
562
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
558
563
|
* @template T Target type
|
|
559
564
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
560
565
|
* @returns A reusable `assertDecode` function
|
|
561
|
-
*
|
|
562
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
563
566
|
*/
|
|
564
567
|
export declare function createAssertDecode<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: Uint8Array) => Resolved<T>;
|
|
565
568
|
/**
|
|
566
569
|
* Creates a reusable {@link validateDecode} function.
|
|
567
570
|
*
|
|
568
|
-
* @danger You must configure the generic argument `T`
|
|
569
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
570
|
-
* @throws compile error
|
|
571
|
-
*
|
|
572
571
|
* @author Jeongho Nam - https://github.com/samchon
|
|
572
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
573
|
+
* @throws Compile error
|
|
574
|
+
* @danger You must configure the generic argument `T`
|
|
573
575
|
*/
|
|
574
576
|
export declare function createValidateDecode(): never;
|
|
575
577
|
/**
|
|
576
578
|
* Creates a reusable {@link validateDecode} function.
|
|
577
579
|
*
|
|
580
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
578
581
|
* @template T Target type
|
|
579
582
|
* @returns A reusable `validateDecode` function
|
|
580
|
-
*
|
|
581
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
582
583
|
*/
|
|
583
584
|
export declare function createValidateDecode<T>(): (input: Uint8Array) => IValidation<Resolved<T>>;
|
|
584
585
|
/**
|
|
585
586
|
* Creates a reusable {@link encode} function.
|
|
586
587
|
*
|
|
587
|
-
* @danger You must configure the generic argument `T`
|
|
588
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
589
|
-
* @throws compile error
|
|
590
|
-
*
|
|
591
588
|
* @author Jeongho Nam - https://github.com/samchon
|
|
589
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
590
|
+
* @throws Compile error
|
|
591
|
+
* @danger You must configure the generic argument `T`
|
|
592
592
|
*/
|
|
593
593
|
export declare function createEncode(): never;
|
|
594
594
|
/**
|
|
595
595
|
* Creates a reusable {@link encode} function.
|
|
596
596
|
*
|
|
597
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
597
598
|
* @template T Target type
|
|
598
599
|
* @returns A reusable `encode` function
|
|
599
|
-
*
|
|
600
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
601
600
|
*/
|
|
602
601
|
export declare function createEncode<T>(): (input: T) => Uint8Array;
|
|
603
602
|
/**
|
|
604
603
|
* Creates a reusable {@link isEncode} function.
|
|
605
604
|
*
|
|
606
|
-
* @danger You must configure the generic argument `T`
|
|
607
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
608
|
-
* @throws compile error
|
|
609
|
-
*
|
|
610
605
|
* @author Jeongho Nam - https://github.com/samchon
|
|
606
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
607
|
+
* @throws Compile error
|
|
608
|
+
* @danger You must configure the generic argument `T`
|
|
611
609
|
*/
|
|
612
610
|
export declare function createIsEncode(): never;
|
|
613
611
|
/**
|
|
614
612
|
* Creates a reusable {@link isEncode} function.
|
|
615
613
|
*
|
|
614
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
616
615
|
* @template T Target type
|
|
617
616
|
* @returns A reusable `isEncode` function
|
|
618
|
-
*
|
|
619
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
620
617
|
*/
|
|
621
618
|
export declare function createIsEncode<T>(): (input: T) => Uint8Array | null;
|
|
622
619
|
/**
|
|
623
620
|
* Creates a reusable {@link assertEncode} function.
|
|
624
621
|
*
|
|
625
|
-
* @
|
|
622
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
626
623
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
627
624
|
* @returns Nothing until you configure the generic argument `T`
|
|
628
|
-
* @throws
|
|
629
|
-
*
|
|
630
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
625
|
+
* @throws Compile error
|
|
626
|
+
* @danger You must configure the generic argument `T`
|
|
631
627
|
*/
|
|
632
628
|
export declare function createAssertEncode(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
633
629
|
/**
|
|
634
630
|
* Creates a reusable {@link assertEncode} function.
|
|
635
631
|
*
|
|
632
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
636
633
|
* @template T Target type
|
|
637
634
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
638
635
|
* @returns A reusable `assertEncode` function
|
|
639
|
-
*
|
|
640
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
641
636
|
*/
|
|
642
637
|
export declare function createAssertEncode<T>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: T) => Uint8Array;
|
|
643
638
|
/**
|
|
644
639
|
* Creates a reusable {@link validateEncode} function.
|
|
645
640
|
*
|
|
646
|
-
* @danger You must configure the generic argument `T`
|
|
647
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
648
|
-
* @throws compile error
|
|
649
|
-
*
|
|
650
641
|
* @author Jeongho Nam - https://github.com/samchon
|
|
642
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
643
|
+
* @throws Compile error
|
|
644
|
+
* @danger You must configure the generic argument `T`
|
|
651
645
|
*/
|
|
652
646
|
export declare function createValidateEncode(): never;
|
|
653
647
|
/**
|
|
654
648
|
* Creates a reusable {@link validateEncode} function.
|
|
655
649
|
*
|
|
650
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
656
651
|
* @template T Target type
|
|
657
652
|
* @returns A reusable `validateEncode` function
|
|
658
|
-
*
|
|
659
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
660
653
|
*/
|
|
661
654
|
export declare function createValidateEncode<T>(): (input: T) => IValidation<Uint8Array>;
|