typia 9.7.1 → 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/programmers/json/JsonStringifyProgrammer.js +2 -2
- package/lib/programmers/json/JsonStringifyProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonStringifyProgrammer.mjs +2 -2
- 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 +16 -16
- package/lib/tags/Constant.d.ts +16 -16
- package/lib/tags/ContentMediaType.d.mts +7 -7
- package/lib/tags/ContentMediaType.d.ts +7 -7
- package/lib/tags/Default.d.mts +19 -19
- package/lib/tags/Default.d.ts +19 -19
- package/lib/tags/Example.d.mts +18 -18
- package/lib/tags/Example.d.ts +18 -18
- package/lib/tags/Examples.d.mts +23 -23
- package/lib/tags/Examples.d.ts +23 -23
- package/lib/tags/ExclusiveMaximum.d.mts +8 -5
- package/lib/tags/ExclusiveMaximum.d.ts +8 -5
- package/lib/tags/ExclusiveMinimum.d.mts +8 -5
- package/lib/tags/ExclusiveMinimum.d.ts +8 -5
- package/lib/tags/Format.d.mts +12 -8
- package/lib/tags/Format.d.ts +12 -8
- package/lib/tags/JsonSchemaPlugin.d.mts +20 -18
- package/lib/tags/JsonSchemaPlugin.d.ts +20 -18
- package/lib/tags/MaxItems.d.mts +9 -9
- package/lib/tags/MaxItems.d.ts +9 -9
- package/lib/tags/MaxLength.d.mts +6 -5
- package/lib/tags/MaxLength.d.ts +6 -5
- package/lib/tags/Maximum.d.mts +9 -7
- package/lib/tags/Maximum.d.ts +9 -7
- package/lib/tags/MinItems.d.mts +9 -9
- package/lib/tags/MinItems.d.ts +9 -9
- package/lib/tags/MinLength.d.mts +6 -5
- package/lib/tags/MinLength.d.ts +6 -5
- package/lib/tags/Minimum.d.mts +9 -7
- package/lib/tags/Minimum.d.ts +9 -7
- package/lib/tags/MultipleOf.d.mts +10 -7
- package/lib/tags/MultipleOf.d.ts +10 -7
- package/lib/tags/Pattern.d.mts +7 -4
- package/lib/tags/Pattern.d.ts +7 -4
- package/lib/tags/Sequence.d.mts +19 -17
- package/lib/tags/Sequence.d.ts +19 -17
- package/lib/tags/TagBase.d.mts +21 -28
- package/lib/tags/TagBase.d.ts +21 -28
- package/lib/tags/Type.d.mts +12 -11
- package/lib/tags/Type.d.ts +12 -11
- package/lib/tags/UniqueItems.d.mts +10 -9
- package/lib/tags/UniqueItems.d.ts +10 -9
- 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 +5 -10
- package/lib/transformers/ImportTransformer.js.map +1 -1
- package/lib/transformers/ImportTransformer.mjs +5 -10
- 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 +44 -42
- 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/programmers/json/JsonStringifyProgrammer.ts +2 -2
- 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 +16 -16
- package/src/tags/ContentMediaType.ts +7 -7
- package/src/tags/Default.ts +19 -19
- package/src/tags/Example.ts +18 -18
- package/src/tags/Examples.ts +23 -23
- package/src/tags/ExclusiveMaximum.ts +8 -5
- package/src/tags/ExclusiveMinimum.ts +8 -5
- package/src/tags/Format.ts +12 -8
- package/src/tags/JsonSchemaPlugin.ts +20 -18
- package/src/tags/MaxItems.ts +9 -9
- package/src/tags/MaxLength.ts +6 -5
- package/src/tags/Maximum.ts +9 -7
- package/src/tags/MinItems.ts +9 -9
- package/src/tags/MinLength.ts +6 -5
- package/src/tags/Minimum.ts +9 -7
- package/src/tags/MultipleOf.ts +10 -7
- package/src/tags/Pattern.ts +7 -4
- package/src/tags/Sequence.ts +19 -17
- package/src/tags/TagBase.ts +21 -28
- package/src/tags/Type.ts +12 -11
- package/src/tags/UniqueItems.ts +10 -9
- package/src/tags/internal/FormatCheatSheet.ts +1 -3
- package/src/transformers/ITransformOptions.ts +27 -19
- package/src/transformers/ImportTransformer.ts +5 -10
- package/src/transformers/NoTransformConfigurationError.ts +1 -3
- package/src/transformers/features/llm/LlmApplicationTransformer.ts +1 -3
- package/src/typings/Equal.ts +6 -6
package/src/protobuf.ts
CHANGED
|
@@ -22,17 +22,18 @@ import { TypeGuardError } from "./TypeGuardError";
|
|
|
22
22
|
* schema would be returned as a string value, and it can be used to share with
|
|
23
23
|
* other developers/languages/frameworks.
|
|
24
24
|
*
|
|
25
|
-
* For reference, Protocol Buffer has lots of restrictions, so that expression
|
|
26
|
-
* of Protocol Buffer is not enough strong to fully meet the TypeScript
|
|
27
|
-
* In such reason, if you put a TypeScript type that is not
|
|
28
|
-
* Buffer, this function would throw compilation
|
|
25
|
+
* For reference, Protocol Buffer has lots of restrictions, so that expression
|
|
26
|
+
* power of Protocol Buffer is not enough strong to fully meet the TypeScript
|
|
27
|
+
* type specs. In such reason, if you put a TypeScript type that is not
|
|
28
|
+
* compatible with Protocol Buffer, this function would throw compilation
|
|
29
|
+
* errors.
|
|
29
30
|
*
|
|
30
|
-
*
|
|
31
|
+
* - [Restrictions of Protocol
|
|
32
|
+
* Buffer](https://typia.io/docs/protobuf/message/#restrictions)
|
|
31
33
|
*
|
|
34
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
32
35
|
* @template T Target type
|
|
33
36
|
* @returns Protocol Buffer Message Schema.
|
|
34
|
-
*
|
|
35
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
36
37
|
*/
|
|
37
38
|
export function message(): never;
|
|
38
39
|
|
|
@@ -43,21 +44,19 @@ export function message(): never;
|
|
|
43
44
|
* schema would be returned as a string value, and it can be used to share with
|
|
44
45
|
* other developers/languages/frameworks.
|
|
45
46
|
*
|
|
46
|
-
* For reference, Protocol Buffer has lots of restrictions, so that expression
|
|
47
|
-
* of Protocol Buffer is not enough strong to fully meet the TypeScript
|
|
48
|
-
* In such reason, if you put a TypeScript type that is not
|
|
49
|
-
* Buffer, this function would throw compilation
|
|
47
|
+
* For reference, Protocol Buffer has lots of restrictions, so that expression
|
|
48
|
+
* power of Protocol Buffer is not enough strong to fully meet the TypeScript
|
|
49
|
+
* type specs. In such reason, if you put a TypeScript type that is not
|
|
50
|
+
* compatible with Protocol Buffer, this function would throw compilation
|
|
51
|
+
* errors.
|
|
50
52
|
*
|
|
53
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
51
54
|
* @template T Target type
|
|
52
55
|
* @returns Protocol Buffer Message Schema.
|
|
53
|
-
*
|
|
54
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
55
56
|
*/
|
|
56
57
|
export function message<T>(): string;
|
|
57
58
|
|
|
58
|
-
/**
|
|
59
|
-
* @internal
|
|
60
|
-
*/
|
|
59
|
+
/** @internal */
|
|
61
60
|
export function message(): never {
|
|
62
61
|
NoTransformConfigurationError("protobuf.message");
|
|
63
62
|
}
|
|
@@ -70,66 +69,64 @@ export function message(): never {
|
|
|
70
69
|
*
|
|
71
70
|
* Protocol Buffer Decoder.
|
|
72
71
|
*
|
|
73
|
-
* `typia.protobuf.decode()` is a function decoding a binary data of Protocol
|
|
74
|
-
* format to a TypeScript instance.
|
|
72
|
+
* `typia.protobuf.decode()` is a function decoding a binary data of Protocol
|
|
73
|
+
* Buffer format to a TypeScript instance.
|
|
75
74
|
*
|
|
76
|
-
* For reference, as Protocol Buffer handles binary data directly, there's no
|
|
77
|
-
* when `input` binary data was not encoded from the `T` typed value. In
|
|
78
|
-
* unexpected behavior or internal error would be occurred.
|
|
79
|
-
* to encode binary data of Protocol Buffer from type
|
|
80
|
-
* Use {@link encode} function only when you
|
|
75
|
+
* For reference, as Protocol Buffer handles binary data directly, there's no
|
|
76
|
+
* way when `input` binary data was not encoded from the `T` typed value. In
|
|
77
|
+
* that case, unexpected behavior or internal error would be occurred.
|
|
78
|
+
* Therefore, I recommend you to encode binary data of Protocol Buffer from type
|
|
79
|
+
* safe encode functions like below. Use {@link encode} function only when you
|
|
80
|
+
* can ensure it.
|
|
81
81
|
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
82
|
+
* - {@link assertEncode}
|
|
83
|
+
* - {@link isEncode}
|
|
84
|
+
* - {@link validateEncode}
|
|
85
85
|
*
|
|
86
|
-
* Also, `typia` is providing type safe decoders like {@link assertDecode}, but
|
|
87
|
-
* is just for additional type validation like `number & Minimum<7>` or
|
|
88
|
-
* `string & Format<"uuid">` cases, that are represented by
|
|
89
|
-
*
|
|
90
|
-
*
|
|
86
|
+
* Also, `typia` is providing type safe decoders like {@link assertDecode}, but
|
|
87
|
+
* it is just for additional type validation like `number & Minimum<7>` or
|
|
88
|
+
* `string & Format<"uuid">` cases, that are represented by [custom
|
|
89
|
+
* tags](https://typia.io/docs/validators/tags). Thus, I repeat that, you've to
|
|
90
|
+
* ensure the type safety when using decoder functions.
|
|
91
91
|
*
|
|
92
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
92
93
|
* @template T Expected type of decoded value
|
|
93
94
|
* @param input Protobuf Buffer binary data
|
|
94
95
|
* @returns Decoded value
|
|
95
|
-
*
|
|
96
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
97
96
|
*/
|
|
98
97
|
export function decode(input: Uint8Array): never;
|
|
99
98
|
|
|
100
99
|
/**
|
|
101
100
|
* Protocol Buffer Decoder.
|
|
102
101
|
*
|
|
103
|
-
* `typia.protobuf.decode()` is a function decoding a binary data of Protocol
|
|
104
|
-
* format to a TypeScript instance.
|
|
102
|
+
* `typia.protobuf.decode()` is a function decoding a binary data of Protocol
|
|
103
|
+
* Buffer format to a TypeScript instance.
|
|
105
104
|
*
|
|
106
|
-
* For reference, as Protocol Buffer handles binary data directly, there's no
|
|
107
|
-
* when `input` binary data was not encoded from the `T` typed value. In
|
|
108
|
-
* unexpected behavior or internal error would be occurred.
|
|
109
|
-
* to encode binary data of Protocol Buffer from type
|
|
110
|
-
* Use {@link encode} function only when you
|
|
105
|
+
* For reference, as Protocol Buffer handles binary data directly, there's no
|
|
106
|
+
* way when `input` binary data was not encoded from the `T` typed value. In
|
|
107
|
+
* that case, unexpected behavior or internal error would be occurred.
|
|
108
|
+
* Therefore, I recommend you to encode binary data of Protocol Buffer from type
|
|
109
|
+
* safe encode functions like below. Use {@link encode} function only when you
|
|
110
|
+
* can ensure it.
|
|
111
111
|
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
112
|
+
* - {@link assertEncode}
|
|
113
|
+
* - {@link isEncode}
|
|
114
|
+
* - {@link validateEncode}
|
|
115
115
|
*
|
|
116
|
-
* Also, `typia` is providing type safe decoders like {@link assertDecode}, but
|
|
117
|
-
* is just for additional type validation like `number & Minimum<7>` or
|
|
118
|
-
* `string & Format<"uuid">` cases, that are represented by
|
|
119
|
-
*
|
|
120
|
-
*
|
|
116
|
+
* Also, `typia` is providing type safe decoders like {@link assertDecode}, but
|
|
117
|
+
* it is just for additional type validation like `number & Minimum<7>` or
|
|
118
|
+
* `string & Format<"uuid">` cases, that are represented by [custom
|
|
119
|
+
* tags](https://typia.io/docs/validators/tags). Thus, I repeat that, you've to
|
|
120
|
+
* ensure the type safety when using decoder functions.
|
|
121
121
|
*
|
|
122
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
122
123
|
* @template T Expected type of decoded value
|
|
123
124
|
* @param input Protobuf Buffer binary data
|
|
124
125
|
* @returns Decoded value
|
|
125
|
-
*
|
|
126
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
127
126
|
*/
|
|
128
127
|
export function decode<T>(input: Uint8Array): Resolved<T>;
|
|
129
128
|
|
|
130
|
-
/**
|
|
131
|
-
* @internal
|
|
132
|
-
*/
|
|
129
|
+
/** @internal */
|
|
133
130
|
export function decode(): never {
|
|
134
131
|
NoTransformConfigurationError("protobuf.decode");
|
|
135
132
|
}
|
|
@@ -139,30 +136,31 @@ export function decode(): never {
|
|
|
139
136
|
*
|
|
140
137
|
* Protocol Buffer Decoder wity type assertion, but not safe.
|
|
141
138
|
*
|
|
142
|
-
* `typia.protobuf.assertDecode()` is a combination function of {@link decode}
|
|
143
|
-
* {@link assert} function. Therefore, it decodes a binary data of Protocol
|
|
144
|
-
* a TypeScript instance, and performs type assertion process. If
|
|
145
|
-
* following the type `T`, it returns the decoded value.
|
|
146
|
-
* {@link TypeGuardError} instead.
|
|
139
|
+
* `typia.protobuf.assertDecode()` is a combination function of {@link decode}
|
|
140
|
+
* and {@link assert} function. Therefore, it decodes a binary data of Protocol
|
|
141
|
+
* Buffer to a TypeScript instance, and performs type assertion process. If
|
|
142
|
+
* decoded value is following the type `T`, it returns the decoded value.
|
|
143
|
+
* Otherwise, it throws {@link TypeGuardError} instead.
|
|
147
144
|
*
|
|
148
|
-
* However, note that, this validation is not always safe. It just performs
|
|
149
|
-
* type assertion like `number & Minimum<7>` or `string &
|
|
150
|
-
* that are represented by [custom
|
|
151
|
-
*
|
|
152
|
-
* ensure the type
|
|
145
|
+
* However, note that, this validation is not always safe. It just performs
|
|
146
|
+
* additional type assertion like `number & Minimum<7>` or `string &
|
|
147
|
+
* Format<"uuid">` cases, that are represented by [custom
|
|
148
|
+
* tags](https://typia.io/docs/validators/tags). Therefore, when using
|
|
149
|
+
* `typia.protobuf.assertDecode<T>()` function, you have to ensure the type
|
|
150
|
+
* safety by yourself.
|
|
153
151
|
*
|
|
154
|
-
* In such type safety reason, I recommend you to use type safe encode
|
|
152
|
+
* In such type safety reason, I recommend you to use type safe encode
|
|
153
|
+
* functions.
|
|
155
154
|
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
155
|
+
* - {@link assertEncode}
|
|
156
|
+
* - {@link isEncode}
|
|
157
|
+
* - {@link validateEncode}
|
|
159
158
|
*
|
|
159
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
160
160
|
* @template T Expected type of decoded value
|
|
161
161
|
* @param input Protobuf Buffer binary data
|
|
162
162
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
163
163
|
* @returns Decoded value
|
|
164
|
-
*
|
|
165
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
166
164
|
*/
|
|
167
165
|
export function assertDecode(
|
|
168
166
|
input: Uint8Array,
|
|
@@ -172,39 +170,38 @@ export function assertDecode(
|
|
|
172
170
|
/**
|
|
173
171
|
* Protocol Buffer Decoder wity type assertion, but not safe.
|
|
174
172
|
*
|
|
175
|
-
* `typia.protobuf.assertDecode()` is a combination function of {@link decode}
|
|
176
|
-
* {@link assert} function. Therefore, it decodes a binary data of Protocol
|
|
177
|
-
* a TypeScript instance, and performs type assertion process. If
|
|
178
|
-
* following the type `T`, it returns the decoded value.
|
|
179
|
-
* {@link TypeGuardError} instead.
|
|
173
|
+
* `typia.protobuf.assertDecode()` is a combination function of {@link decode}
|
|
174
|
+
* and {@link assert} function. Therefore, it decodes a binary data of Protocol
|
|
175
|
+
* Buffer to a TypeScript instance, and performs type assertion process. If
|
|
176
|
+
* decoded value is following the type `T`, it returns the decoded value.
|
|
177
|
+
* Otherwise, it throws {@link TypeGuardError} instead.
|
|
180
178
|
*
|
|
181
|
-
* However, note that, this validation is not always safe. It just performs
|
|
182
|
-
* type assertion like `number & Minimum<7>` or `string &
|
|
183
|
-
* that are represented by [custom
|
|
184
|
-
*
|
|
185
|
-
* ensure the type
|
|
179
|
+
* However, note that, this validation is not always safe. It just performs
|
|
180
|
+
* additional type assertion like `number & Minimum<7>` or `string &
|
|
181
|
+
* Format<"uuid">` cases, that are represented by [custom
|
|
182
|
+
* tags](https://typia.io/docs/validators/tags). Therefore, when using
|
|
183
|
+
* `typia.protobuf.assertDecode<T>()` function, you have to ensure the type
|
|
184
|
+
* safety by yourself.
|
|
186
185
|
*
|
|
187
|
-
* In such type safety reason, I recommend you to use type safe encode
|
|
186
|
+
* In such type safety reason, I recommend you to use type safe encode
|
|
187
|
+
* functions.
|
|
188
188
|
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
189
|
+
* - {@link assertEncode}
|
|
190
|
+
* - {@link isEncode}
|
|
191
|
+
* - {@link validateEncode}
|
|
192
192
|
*
|
|
193
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
193
194
|
* @template T Expected type of decoded value
|
|
194
195
|
* @param input Protobuf Buffer binary data
|
|
195
196
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
196
197
|
* @returns Decoded value
|
|
197
|
-
*
|
|
198
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
199
198
|
*/
|
|
200
199
|
export function assertDecode<T>(
|
|
201
200
|
input: Uint8Array,
|
|
202
201
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
203
202
|
): Resolved<T>;
|
|
204
203
|
|
|
205
|
-
/**
|
|
206
|
-
* @internal
|
|
207
|
-
*/
|
|
204
|
+
/** @internal */
|
|
208
205
|
export function assertDecode(): never {
|
|
209
206
|
NoTransformConfigurationError("protobuf.assertDecode");
|
|
210
207
|
}
|
|
@@ -216,27 +213,28 @@ export function assertDecode(): never {
|
|
|
216
213
|
*
|
|
217
214
|
* `typia.protobuf.isDecode()` is a combination function of {@link decode} and
|
|
218
215
|
* {@link is} function. Therefore, it decodes a binary data of Protocol Buffer to
|
|
219
|
-
* a TypeScript instance, and performs type checking process. If decoded value
|
|
220
|
-
* following the type `T`, it returns the decoded value. Otherwise, it
|
|
221
|
-
* `null` value instead.
|
|
216
|
+
* a TypeScript instance, and performs type checking process. If decoded value
|
|
217
|
+
* is following the type `T`, it returns the decoded value. Otherwise, it
|
|
218
|
+
* returns `null` value instead.
|
|
222
219
|
*
|
|
223
|
-
* However, note that, this validation is not always safe. It just performs
|
|
224
|
-
* type checking like `number & Minimum<7>` or `string &
|
|
225
|
-
* that are represented by [custom
|
|
226
|
-
*
|
|
227
|
-
* ensure the type safety
|
|
220
|
+
* However, note that, this validation is not always safe. It just performs
|
|
221
|
+
* additional type checking like `number & Minimum<7>` or `string &
|
|
222
|
+
* Format<"uuid">` cases, that are represented by [custom
|
|
223
|
+
* tags](https://typia.io/docs/validators/tags). Therefore, when using
|
|
224
|
+
* `typia.protobuf.isDecode<T>()` function, you have to ensure the type safety
|
|
225
|
+
* by yourself.
|
|
228
226
|
*
|
|
229
|
-
* In such type safety reason, I recommend you to use type safe encode
|
|
227
|
+
* In such type safety reason, I recommend you to use type safe encode
|
|
228
|
+
* functions.
|
|
230
229
|
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
230
|
+
* - {@link assertEncode}
|
|
231
|
+
* - {@link isEncode}
|
|
232
|
+
* - {@link validateEncode}
|
|
234
233
|
*
|
|
234
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
235
235
|
* @template T Expected type of decoded value
|
|
236
236
|
* @param input Protobuf Buffer binary data
|
|
237
237
|
* @returns Decoded value
|
|
238
|
-
*
|
|
239
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
240
238
|
*/
|
|
241
239
|
export function isDecode(input: Uint8Array): never;
|
|
242
240
|
|
|
@@ -245,33 +243,32 @@ export function isDecode(input: Uint8Array): never;
|
|
|
245
243
|
*
|
|
246
244
|
* `typia.protobuf.isDecode()` is a combination function of {@link decode} and
|
|
247
245
|
* {@link is} function. Therefore, it decodes a binary data of Protocol Buffer to
|
|
248
|
-
* a TypeScript instance, and performs type checking process. If decoded value
|
|
249
|
-
* following the type `T`, it returns the decoded value. Otherwise, it
|
|
250
|
-
* `null` value instead.
|
|
246
|
+
* a TypeScript instance, and performs type checking process. If decoded value
|
|
247
|
+
* is following the type `T`, it returns the decoded value. Otherwise, it
|
|
248
|
+
* returns `null` value instead.
|
|
251
249
|
*
|
|
252
|
-
* However, note that, this validation is not always safe. It just performs
|
|
253
|
-
* type checking like `number & Minimum<7>` or `string &
|
|
254
|
-
* that are represented by [custom
|
|
255
|
-
*
|
|
256
|
-
* ensure the type safety
|
|
250
|
+
* However, note that, this validation is not always safe. It just performs
|
|
251
|
+
* additional type checking like `number & Minimum<7>` or `string &
|
|
252
|
+
* Format<"uuid">` cases, that are represented by [custom
|
|
253
|
+
* tags](https://typia.io/docs/validators/tags). Therefore, when using
|
|
254
|
+
* `typia.protobuf.isDecode<T>()` function, you have to ensure the type safety
|
|
255
|
+
* by yourself.
|
|
257
256
|
*
|
|
258
|
-
* In such type safety reason, I recommend you to use type safe encode
|
|
257
|
+
* In such type safety reason, I recommend you to use type safe encode
|
|
258
|
+
* functions.
|
|
259
259
|
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
260
|
+
* - {@link assertEncode}
|
|
261
|
+
* - {@link isEncode}
|
|
262
|
+
* - {@link validateEncode}
|
|
263
263
|
*
|
|
264
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
264
265
|
* @template T Expected type of decoded value
|
|
265
266
|
* @param input Protobuf Buffer binary data
|
|
266
267
|
* @returns Decoded value
|
|
267
|
-
*
|
|
268
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
269
268
|
*/
|
|
270
269
|
export function isDecode<T>(input: Uint8Array): Resolved<T> | null;
|
|
271
270
|
|
|
272
|
-
/**
|
|
273
|
-
* @internal
|
|
274
|
-
*/
|
|
271
|
+
/** @internal */
|
|
275
272
|
export function isDecode(): never {
|
|
276
273
|
NoTransformConfigurationError("protobuf.isDecode");
|
|
277
274
|
}
|
|
@@ -281,66 +278,66 @@ export function isDecode(): never {
|
|
|
281
278
|
*
|
|
282
279
|
* Protocol Buffer Decoder wity type validation, but not safe.
|
|
283
280
|
*
|
|
284
|
-
* `typia.protobuf.validateDecode()` is a combination function of {@link decode}
|
|
285
|
-
* {@link validate} function. Therefore, it decodes a binary data of Protocol
|
|
286
|
-
* a TypeScript instance, and performs type validation process. If
|
|
287
|
-
* following the type `T`, it returns the decoded value with
|
|
281
|
+
* `typia.protobuf.validateDecode()` is a combination function of {@link decode}
|
|
282
|
+
* and {@link validate} function. Therefore, it decodes a binary data of Protocol
|
|
283
|
+
* Buffer to a TypeScript instance, and performs type validation process. If
|
|
284
|
+
* decoded value is following the type `T`, it returns the decoded value with
|
|
288
285
|
* {@link IValidation.ISuccess} typed instance. Otherwise, it returns
|
|
289
286
|
* {@link IValidation.IFailure} value instead with detailed error reasons.
|
|
290
287
|
*
|
|
291
|
-
* However, note that, this validation is not always safe. It just performs
|
|
292
|
-
* type validation like `number & Minimum<7>` or `string &
|
|
293
|
-
* that are represented by [custom
|
|
294
|
-
*
|
|
295
|
-
* ensure the type
|
|
288
|
+
* However, note that, this validation is not always safe. It just performs
|
|
289
|
+
* additional type validation like `number & Minimum<7>` or `string &
|
|
290
|
+
* Format<"uuid">` cases, that are represented by [custom
|
|
291
|
+
* tags](https://typia.io/docs/validators/tags). Therefore, when using
|
|
292
|
+
* `typia.protobuf.validateDecode<T>()` function, you have to ensure the type
|
|
293
|
+
* safety by yourself.
|
|
296
294
|
*
|
|
297
|
-
* In such type safety reason, I recommend you to use type safe encode
|
|
295
|
+
* In such type safety reason, I recommend you to use type safe encode
|
|
296
|
+
* functions.
|
|
298
297
|
*
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
*
|
|
298
|
+
* - {@link assertEncode}
|
|
299
|
+
* - {@link isEncode}
|
|
300
|
+
* - {@link validateEncode}
|
|
302
301
|
*
|
|
302
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
303
303
|
* @template T Expected type of decoded value
|
|
304
304
|
* @param input Protobuf Buffer binary data
|
|
305
305
|
* @returns Decoded value
|
|
306
|
-
*
|
|
307
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
308
306
|
*/
|
|
309
307
|
export function validateDecode(input: Uint8Array): never;
|
|
310
308
|
|
|
311
309
|
/**
|
|
312
310
|
* Protocol Buffer Decoder wity type validation, but not safe.
|
|
313
311
|
*
|
|
314
|
-
* `typia.protobuf.validateDecode()` is a combination function of {@link decode}
|
|
315
|
-
* {@link validate} function. Therefore, it decodes a binary data of Protocol
|
|
316
|
-
* a TypeScript instance, and performs type validation process. If
|
|
317
|
-
* following the type `T`, it returns the decoded value with
|
|
312
|
+
* `typia.protobuf.validateDecode()` is a combination function of {@link decode}
|
|
313
|
+
* and {@link validate} function. Therefore, it decodes a binary data of Protocol
|
|
314
|
+
* Buffer to a TypeScript instance, and performs type validation process. If
|
|
315
|
+
* decoded value is following the type `T`, it returns the decoded value with
|
|
318
316
|
* {@link IValidation.ISuccess} typed instance. Otherwise, it returns
|
|
319
317
|
* {@link IValidation.IFailure} value instead with detailed error reasons.
|
|
320
318
|
*
|
|
321
|
-
* However, note that, this validation is not always safe. It just performs
|
|
322
|
-
* type validation like `number & Minimum<7>` or `string &
|
|
323
|
-
* that are represented by [custom
|
|
324
|
-
*
|
|
325
|
-
* ensure the type
|
|
319
|
+
* However, note that, this validation is not always safe. It just performs
|
|
320
|
+
* additional type validation like `number & Minimum<7>` or `string &
|
|
321
|
+
* Format<"uuid">` cases, that are represented by [custom
|
|
322
|
+
* tags](https://typia.io/docs/validators/tags). Therefore, when using
|
|
323
|
+
* `typia.protobuf.validateDecode<T>()` function, you have to ensure the type
|
|
324
|
+
* safety by yourself.
|
|
326
325
|
*
|
|
327
|
-
* In such type safety reason, I recommend you to use type safe encode
|
|
326
|
+
* In such type safety reason, I recommend you to use type safe encode
|
|
327
|
+
* functions.
|
|
328
328
|
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
329
|
+
* - {@link assertEncode}
|
|
330
|
+
* - {@link isEncode}
|
|
331
|
+
* - {@link validateEncode}
|
|
332
332
|
*
|
|
333
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
333
334
|
* @template T Expected type of decoded value
|
|
334
335
|
* @param input Protobuf Buffer binary data
|
|
335
336
|
* @returns Decoded value
|
|
336
|
-
*
|
|
337
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
338
337
|
*/
|
|
339
338
|
export function validateDecode<T>(input: Uint8Array): IValidation<Resolved<T>>;
|
|
340
339
|
|
|
341
|
-
/**
|
|
342
|
-
* @internal
|
|
343
|
-
*/
|
|
340
|
+
/** @internal */
|
|
344
341
|
export function validateDecode(): never {
|
|
345
342
|
NoTransformConfigurationError("protobuf.validateDecode");
|
|
346
343
|
}
|
|
@@ -353,33 +350,31 @@ export function validateDecode(): never {
|
|
|
353
350
|
*
|
|
354
351
|
* Converts an input value to a binary data of Protocol Buffer format.
|
|
355
352
|
*
|
|
356
|
-
* For reference, this `typia.protobuf.encode()` does not validate the `input`
|
|
357
|
-
* It just believes that the `input` value is valid and converts it to a
|
|
358
|
-
* directly. Therefore, if you can't ensure the `input` value type,
|
|
359
|
-
* call one of below functions instead.
|
|
353
|
+
* For reference, this `typia.protobuf.encode()` does not validate the `input`
|
|
354
|
+
* value. It just believes that the `input` value is valid and converts it to a
|
|
355
|
+
* binary data directly. Therefore, if you can't ensure the `input` value type,
|
|
356
|
+
* it would better to call one of below functions instead.
|
|
360
357
|
*
|
|
361
|
-
*
|
|
362
|
-
*
|
|
363
|
-
*
|
|
358
|
+
* - {@link assertEncode}
|
|
359
|
+
* - {@link isEncode}
|
|
360
|
+
* - {@link validateEncode}
|
|
364
361
|
*
|
|
365
|
-
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
366
|
-
* to fully meet the TypeScript type specs. In such reason, if you put a
|
|
367
|
-
* type that is not compatible with Protocol Buffer, this function
|
|
368
|
-
* compilation errors.
|
|
362
|
+
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
363
|
+
* strong to fully meet the TypeScript type specs. In such reason, if you put a
|
|
364
|
+
* TypeScript type that is not compatible with Protocol Buffer, this function
|
|
365
|
+
* would throw compilation errors.
|
|
369
366
|
*
|
|
370
|
-
*
|
|
367
|
+
* - [Restrictions of Protocol
|
|
368
|
+
* Buffer](https://typia.io/docs/protobuf/message/#restrictions)
|
|
371
369
|
*
|
|
370
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
372
371
|
* @template T Type of the value input
|
|
373
372
|
* @param input A value to encode
|
|
374
373
|
* @returns Encoded binary data
|
|
375
|
-
*
|
|
376
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
377
374
|
*/
|
|
378
375
|
export function encode<T>(input: T): Uint8Array;
|
|
379
376
|
|
|
380
|
-
/**
|
|
381
|
-
* @internal
|
|
382
|
-
*/
|
|
377
|
+
/** @internal */
|
|
383
378
|
export function encode(): never {
|
|
384
379
|
NoTransformConfigurationError("protobuf.encode");
|
|
385
380
|
}
|
|
@@ -387,34 +382,34 @@ export function encode(): never {
|
|
|
387
382
|
/**
|
|
388
383
|
* Protocol Buffer Encoder with type assertion.
|
|
389
384
|
*
|
|
390
|
-
* `typia.protobuf.assertEncode()` is a combination function of {@link assert}
|
|
391
|
-
* {@link encode}.
|
|
385
|
+
* `typia.protobuf.assertEncode()` is a combination function of {@link assert}
|
|
386
|
+
* and {@link encode}.
|
|
392
387
|
*
|
|
393
|
-
* Therefore, it converts an `input` value to a binary data of
|
|
394
|
-
*
|
|
388
|
+
* Therefore, it converts an `input` value to a binary data of Protocol Buffer,
|
|
389
|
+
* with type assertion. If `input` value is not valid, it throws
|
|
395
390
|
* {@link TypeGuardError}. Otherwise, there's no problem on the `input` value,
|
|
396
391
|
* Protocol Buffer binary data would be returned.
|
|
397
392
|
*
|
|
398
|
-
* If you can trust `input` value, or want to perform other type of validation,
|
|
399
|
-
* below functions instead.
|
|
393
|
+
* If you can trust `input` value, or want to perform other type of validation,
|
|
394
|
+
* use below functions instead.
|
|
400
395
|
*
|
|
401
|
-
*
|
|
402
|
-
*
|
|
403
|
-
*
|
|
396
|
+
* - {@link encode}
|
|
397
|
+
* - {@link isEncode}
|
|
398
|
+
* - {@link validateEncode}
|
|
404
399
|
*
|
|
405
|
-
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
406
|
-
* to fully meet the TypeScript type specs. In such reason, if you put a
|
|
407
|
-
* type that is not compatible with Protocol Buffer, this function
|
|
408
|
-
* compilation errors.
|
|
400
|
+
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
401
|
+
* strong to fully meet the TypeScript type specs. In such reason, if you put a
|
|
402
|
+
* TypeScript type that is not compatible with Protocol Buffer, this function
|
|
403
|
+
* would throw compilation errors.
|
|
409
404
|
*
|
|
410
|
-
*
|
|
405
|
+
* - [Restrictions of Protocol
|
|
406
|
+
* Buffer](https://typia.io/docs/protobuf/message/#restrictions)
|
|
411
407
|
*
|
|
408
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
412
409
|
* @template T Type of the value input
|
|
413
410
|
* @param input A value to encode
|
|
414
411
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
415
412
|
* @returns Encoded binary data
|
|
416
|
-
*
|
|
417
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
418
413
|
*/
|
|
419
414
|
export function assertEncode<T>(
|
|
420
415
|
input: T,
|
|
@@ -424,43 +419,41 @@ export function assertEncode<T>(
|
|
|
424
419
|
/**
|
|
425
420
|
* Protocol Buffer Encoder with type assertion.
|
|
426
421
|
*
|
|
427
|
-
* `typia.protobuf.assertEncode()` is a combination function of {@link assert}
|
|
428
|
-
* {@link encode}.
|
|
422
|
+
* `typia.protobuf.assertEncode()` is a combination function of {@link assert}
|
|
423
|
+
* and {@link encode}.
|
|
429
424
|
*
|
|
430
|
-
* Therefore, it converts an `input` value to a binary data of
|
|
431
|
-
*
|
|
425
|
+
* Therefore, it converts an `input` value to a binary data of Protocol Buffer,
|
|
426
|
+
* with type assertion. If `input` value is not valid, it throws
|
|
432
427
|
* {@link TypeGuardError}. Otherwise, there's no problem on the `input` value,
|
|
433
428
|
* Protocol Buffer binary data would be returned.
|
|
434
429
|
*
|
|
435
|
-
* If you can trust `input` value, or want to perform other type of validation,
|
|
436
|
-
* below functions instead.
|
|
430
|
+
* If you can trust `input` value, or want to perform other type of validation,
|
|
431
|
+
* use below functions instead.
|
|
437
432
|
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
433
|
+
* - {@link encode}
|
|
434
|
+
* - {@link isEncode}
|
|
435
|
+
* - {@link validateEncode}
|
|
441
436
|
*
|
|
442
|
-
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
443
|
-
* to fully meet the TypeScript type specs. In such reason, if you put a
|
|
444
|
-
* type that is not compatible with Protocol Buffer, this function
|
|
445
|
-
* compilation errors.
|
|
437
|
+
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
438
|
+
* strong to fully meet the TypeScript type specs. In such reason, if you put a
|
|
439
|
+
* TypeScript type that is not compatible with Protocol Buffer, this function
|
|
440
|
+
* would throw compilation errors.
|
|
446
441
|
*
|
|
447
|
-
*
|
|
442
|
+
* - [Restrictions of Protocol
|
|
443
|
+
* Buffer](https://typia.io/docs/protobuf/message/#restrictions)
|
|
448
444
|
*
|
|
445
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
449
446
|
* @template T Type of the value input
|
|
450
447
|
* @param input A value to encode
|
|
451
448
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
452
449
|
* @returns Encoded binary data
|
|
453
|
-
*
|
|
454
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
455
450
|
*/
|
|
456
451
|
export function assertEncode<T>(
|
|
457
452
|
input: unknown,
|
|
458
453
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
459
454
|
): Uint8Array;
|
|
460
455
|
|
|
461
|
-
/**
|
|
462
|
-
* @internal
|
|
463
|
-
*/
|
|
456
|
+
/** @internal */
|
|
464
457
|
export function assertEncode(): never {
|
|
465
458
|
NoTransformConfigurationError("protobuf.assertEncode");
|
|
466
459
|
}
|
|
@@ -471,30 +464,30 @@ export function assertEncode(): never {
|
|
|
471
464
|
* `typia.protobuf.isEncode()` is a combination function of {@link is} and
|
|
472
465
|
* {@link encode}.
|
|
473
466
|
*
|
|
474
|
-
* Therefore, it converts an `input` value to a binary data of
|
|
475
|
-
*
|
|
476
|
-
*
|
|
477
|
-
*
|
|
467
|
+
* Therefore, it converts an `input` value to a binary data of Protocol Buffer,
|
|
468
|
+
* with type checking. If `input` value is not valid, it returns `null` value.
|
|
469
|
+
* Otherwise, there's no problem on the `input` value, Protocol Buffer binary
|
|
470
|
+
* data would be returned.
|
|
478
471
|
*
|
|
479
|
-
* If you can trust `input` value, or want to perform other type of validation,
|
|
480
|
-
* below functions instead.
|
|
472
|
+
* If you can trust `input` value, or want to perform other type of validation,
|
|
473
|
+
* use below functions instead.
|
|
481
474
|
*
|
|
482
|
-
*
|
|
483
|
-
*
|
|
484
|
-
*
|
|
475
|
+
* - {@link encode}
|
|
476
|
+
* - {@link assertEncode}
|
|
477
|
+
* - {@link validateEncode}
|
|
485
478
|
*
|
|
486
|
-
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
487
|
-
* to fully meet the TypeScript type specs. In such reason, if you put a
|
|
488
|
-
* type that is not compatible with Protocol Buffer, this function
|
|
489
|
-
* compilation errors.
|
|
479
|
+
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
480
|
+
* strong to fully meet the TypeScript type specs. In such reason, if you put a
|
|
481
|
+
* TypeScript type that is not compatible with Protocol Buffer, this function
|
|
482
|
+
* would throw compilation errors.
|
|
490
483
|
*
|
|
491
|
-
*
|
|
484
|
+
* - [Restrictions of Protocol
|
|
485
|
+
* Buffer](https://typia.io/docs/protobuf/message/#restrictions)
|
|
492
486
|
*
|
|
487
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
493
488
|
* @template T Type of the value input
|
|
494
489
|
* @param input A value to encode
|
|
495
490
|
* @returns Encoded binary data
|
|
496
|
-
*
|
|
497
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
498
491
|
*/
|
|
499
492
|
export function isEncode<T>(input: T): Uint8Array | null;
|
|
500
493
|
|
|
@@ -504,36 +497,34 @@ export function isEncode<T>(input: T): Uint8Array | null;
|
|
|
504
497
|
* `typia.protobuf.isEncode()` is a combination function of {@link is} and
|
|
505
498
|
* {@link encode}.
|
|
506
499
|
*
|
|
507
|
-
* Therefore, it converts an `input` value to a binary data of
|
|
508
|
-
*
|
|
509
|
-
*
|
|
510
|
-
*
|
|
500
|
+
* Therefore, it converts an `input` value to a binary data of Protocol Buffer,
|
|
501
|
+
* with type checking. If `input` value is not valid, it returns `null` value.
|
|
502
|
+
* Otherwise, there's no problem on the `input` value, Protocol Buffer binary
|
|
503
|
+
* data would be returned.
|
|
511
504
|
*
|
|
512
|
-
* If you can trust `input` value, or want to perform other type of validation,
|
|
513
|
-
* below functions instead.
|
|
505
|
+
* If you can trust `input` value, or want to perform other type of validation,
|
|
506
|
+
* use below functions instead.
|
|
514
507
|
*
|
|
515
|
-
*
|
|
516
|
-
*
|
|
517
|
-
*
|
|
508
|
+
* - {@link encode}
|
|
509
|
+
* - {@link assertEncode}
|
|
510
|
+
* - {@link validateEncode}
|
|
518
511
|
*
|
|
519
|
-
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
520
|
-
* to fully meet the TypeScript type specs. In such reason, if you put a
|
|
521
|
-
* type that is not compatible with Protocol Buffer, this function
|
|
522
|
-
* compilation errors.
|
|
512
|
+
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
513
|
+
* strong to fully meet the TypeScript type specs. In such reason, if you put a
|
|
514
|
+
* TypeScript type that is not compatible with Protocol Buffer, this function
|
|
515
|
+
* would throw compilation errors.
|
|
523
516
|
*
|
|
524
|
-
*
|
|
517
|
+
* - [Restrictions of Protocol
|
|
518
|
+
* Buffer](https://typia.io/docs/protobuf/message/#restrictions)
|
|
525
519
|
*
|
|
520
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
526
521
|
* @template T Type of the value input
|
|
527
522
|
* @param input A value to encode
|
|
528
523
|
* @returns Encoded binary data
|
|
529
|
-
*
|
|
530
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
531
524
|
*/
|
|
532
525
|
export function isEncode<T>(input: unknown): Uint8Array | null;
|
|
533
526
|
|
|
534
|
-
/**
|
|
535
|
-
* @internal
|
|
536
|
-
*/
|
|
527
|
+
/** @internal */
|
|
537
528
|
export function isEncode(): never {
|
|
538
529
|
NoTransformConfigurationError("protobuf.isEncode");
|
|
539
530
|
}
|
|
@@ -544,31 +535,32 @@ export function isEncode(): never {
|
|
|
544
535
|
* `typia.protobuf.validateEncode()` is a combination function of
|
|
545
536
|
* {@link validation} and {@link encode}.
|
|
546
537
|
*
|
|
547
|
-
* Therefore, it converts an `input` value to a binary data of
|
|
548
|
-
*
|
|
549
|
-
* {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
|
|
550
|
-
* no problem on the `input` value, Protocol Buffer binary data would be
|
|
551
|
-
* `data` property of the output {@link IValidation.ISuccess}
|
|
538
|
+
* Therefore, it converts an `input` value to a binary data of Protocol Buffer,
|
|
539
|
+
* with type validation. If `input` value is not valid, it returns
|
|
540
|
+
* {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
|
|
541
|
+
* there's no problem on the `input` value, Protocol Buffer binary data would be
|
|
542
|
+
* stored in `data` property of the output {@link IValidation.ISuccess}
|
|
543
|
+
* instance.
|
|
552
544
|
*
|
|
553
|
-
* If you can trust `input` value, or want to perform other type of validation,
|
|
554
|
-
* below functions instead.
|
|
545
|
+
* If you can trust `input` value, or want to perform other type of validation,
|
|
546
|
+
* use below functions instead.
|
|
555
547
|
*
|
|
556
|
-
*
|
|
557
|
-
*
|
|
558
|
-
*
|
|
548
|
+
* - {@link encode}
|
|
549
|
+
* - {@link assertEncode}
|
|
550
|
+
* - {@link isEncode}
|
|
559
551
|
*
|
|
560
|
-
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
561
|
-
* to fully meet the TypeScript type specs. In such reason, if you put a
|
|
562
|
-
* type that is not compatible with Protocol Buffer, this function
|
|
563
|
-
* compilation errors.
|
|
552
|
+
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
553
|
+
* strong to fully meet the TypeScript type specs. In such reason, if you put a
|
|
554
|
+
* TypeScript type that is not compatible with Protocol Buffer, this function
|
|
555
|
+
* would throw compilation errors.
|
|
564
556
|
*
|
|
565
|
-
*
|
|
557
|
+
* - [Restrictions of Protocol
|
|
558
|
+
* Buffer](https://typia.io/docs/protobuf/message/#restrictions)
|
|
566
559
|
*
|
|
560
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
567
561
|
* @template T Type of the value input
|
|
568
562
|
* @param input A value to encode
|
|
569
563
|
* @returns Encoded binary data
|
|
570
|
-
*
|
|
571
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
572
564
|
*/
|
|
573
565
|
export function validateEncode<T>(input: T): IValidation<Uint8Array>;
|
|
574
566
|
|
|
@@ -578,37 +570,36 @@ export function validateEncode<T>(input: T): IValidation<Uint8Array>;
|
|
|
578
570
|
* `typia.protobuf.validateEncode()` is a combination function of
|
|
579
571
|
* {@link validation} and {@link encode}.
|
|
580
572
|
*
|
|
581
|
-
* Therefore, it converts an `input` value to a binary data of
|
|
582
|
-
*
|
|
583
|
-
* {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
|
|
584
|
-
* no problem on the `input` value, Protocol Buffer binary data would be
|
|
585
|
-
* `data` property of the output {@link IValidation.ISuccess}
|
|
573
|
+
* Therefore, it converts an `input` value to a binary data of Protocol Buffer,
|
|
574
|
+
* with type validation. If `input` value is not valid, it returns
|
|
575
|
+
* {@link IValidation.IFailure} value with detailed error reasons. Otherwise,
|
|
576
|
+
* there's no problem on the `input` value, Protocol Buffer binary data would be
|
|
577
|
+
* stored in `data` property of the output {@link IValidation.ISuccess}
|
|
578
|
+
* instance.
|
|
586
579
|
*
|
|
587
|
-
* If you can trust `input` value, or want to perform other type of validation,
|
|
588
|
-
* below functions instead.
|
|
580
|
+
* If you can trust `input` value, or want to perform other type of validation,
|
|
581
|
+
* use below functions instead.
|
|
589
582
|
*
|
|
590
|
-
*
|
|
591
|
-
*
|
|
592
|
-
*
|
|
583
|
+
* - {@link encode}
|
|
584
|
+
* - {@link assertEncode}
|
|
585
|
+
* - {@link isEncode}
|
|
593
586
|
*
|
|
594
|
-
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
595
|
-
* to fully meet the TypeScript type specs. In such reason, if you put a
|
|
596
|
-
* type that is not compatible with Protocol Buffer, this function
|
|
597
|
-
* compilation errors.
|
|
587
|
+
* By the way, you know what? Expression power of Protocol Buffer is not enough
|
|
588
|
+
* strong to fully meet the TypeScript type specs. In such reason, if you put a
|
|
589
|
+
* TypeScript type that is not compatible with Protocol Buffer, this function
|
|
590
|
+
* would throw compilation errors.
|
|
598
591
|
*
|
|
599
|
-
*
|
|
592
|
+
* - [Restrictions of Protocol
|
|
593
|
+
* Buffer](https://typia.io/docs/protobuf/message/#restrictions)
|
|
600
594
|
*
|
|
595
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
601
596
|
* @template T Type of the value input
|
|
602
597
|
* @param input A value to encode
|
|
603
598
|
* @returns Encoded binary data
|
|
604
|
-
*
|
|
605
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
606
599
|
*/
|
|
607
600
|
export function validateEncode<T>(input: unknown): IValidation<Uint8Array>;
|
|
608
601
|
|
|
609
|
-
/**
|
|
610
|
-
* @internal
|
|
611
|
-
*/
|
|
602
|
+
/** @internal */
|
|
612
603
|
export function validateEncode(): never {
|
|
613
604
|
NoTransformConfigurationError("protobuf.validateEncode");
|
|
614
605
|
}
|
|
@@ -619,27 +610,23 @@ export function validateEncode(): never {
|
|
|
619
610
|
/**
|
|
620
611
|
* Creates a reusable {@link decode} function.
|
|
621
612
|
*
|
|
622
|
-
* @danger You must configure the generic argument `T`
|
|
623
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
624
|
-
* @throws compile error
|
|
625
|
-
*
|
|
626
613
|
* @author Jeongho Nam - https://github.com/samchon
|
|
614
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
615
|
+
* @throws Compile error
|
|
616
|
+
* @danger You must configure the generic argument `T`
|
|
627
617
|
*/
|
|
628
618
|
export function createDecode(): never;
|
|
629
619
|
|
|
630
620
|
/**
|
|
631
621
|
* Creates a reusable {@link decode} function.
|
|
632
622
|
*
|
|
623
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
633
624
|
* @template T Target type
|
|
634
625
|
* @returns A reusable `decode` function
|
|
635
|
-
*
|
|
636
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
637
626
|
*/
|
|
638
627
|
export function createDecode<T>(): (input: Uint8Array) => Resolved<T>;
|
|
639
628
|
|
|
640
|
-
/**
|
|
641
|
-
* @internal
|
|
642
|
-
*/
|
|
629
|
+
/** @internal */
|
|
643
630
|
export function createDecode<T>(): (input: Uint8Array) => Resolved<T> {
|
|
644
631
|
NoTransformConfigurationError("protobuf.createDecode");
|
|
645
632
|
}
|
|
@@ -647,27 +634,23 @@ export function createDecode<T>(): (input: Uint8Array) => Resolved<T> {
|
|
|
647
634
|
/**
|
|
648
635
|
* Creates a reusable {@link isDecode} function.
|
|
649
636
|
*
|
|
650
|
-
* @danger You must configure the generic argument `T`
|
|
651
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
652
|
-
* @throws compile error
|
|
653
|
-
*
|
|
654
637
|
* @author Jeongho Nam - https://github.com/samchon
|
|
638
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
639
|
+
* @throws Compile error
|
|
640
|
+
* @danger You must configure the generic argument `T`
|
|
655
641
|
*/
|
|
656
642
|
export function createIsDecode(): never;
|
|
657
643
|
|
|
658
644
|
/**
|
|
659
645
|
* Creates a reusable {@link isDecode} function.
|
|
660
646
|
*
|
|
647
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
661
648
|
* @template T Target type
|
|
662
649
|
* @returns A reusable `isDecode` function
|
|
663
|
-
*
|
|
664
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
665
650
|
*/
|
|
666
651
|
export function createIsDecode<T>(): (input: Uint8Array) => Resolved<T> | null;
|
|
667
652
|
|
|
668
|
-
/**
|
|
669
|
-
* @internal
|
|
670
|
-
*/
|
|
653
|
+
/** @internal */
|
|
671
654
|
export function createIsDecode<T>(): (input: Uint8Array) => Resolved<T> | null {
|
|
672
655
|
NoTransformConfigurationError("protobuf.createIsDecode");
|
|
673
656
|
}
|
|
@@ -675,12 +658,11 @@ export function createIsDecode<T>(): (input: Uint8Array) => Resolved<T> | null {
|
|
|
675
658
|
/**
|
|
676
659
|
* Creates a reusable {@link assertDecode} function.
|
|
677
660
|
*
|
|
678
|
-
* @
|
|
661
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
679
662
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
680
663
|
* @returns Nothing until you configure the generic argument `T`
|
|
681
|
-
* @throws
|
|
682
|
-
*
|
|
683
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
664
|
+
* @throws Compile error
|
|
665
|
+
* @danger You must configure the generic argument `T`
|
|
684
666
|
*/
|
|
685
667
|
export function createAssertDecode(
|
|
686
668
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
@@ -689,19 +671,16 @@ export function createAssertDecode(
|
|
|
689
671
|
/**
|
|
690
672
|
* Creates a reusable {@link assertDecode} function.
|
|
691
673
|
*
|
|
674
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
692
675
|
* @template T Target type
|
|
693
676
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
694
677
|
* @returns A reusable `assertDecode` function
|
|
695
|
-
*
|
|
696
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
697
678
|
*/
|
|
698
679
|
export function createAssertDecode<T>(
|
|
699
680
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
700
681
|
): (input: Uint8Array) => Resolved<T>;
|
|
701
682
|
|
|
702
|
-
/**
|
|
703
|
-
* @internal
|
|
704
|
-
*/
|
|
683
|
+
/** @internal */
|
|
705
684
|
export function createAssertDecode<T>(): (input: Uint8Array) => Resolved<T> {
|
|
706
685
|
NoTransformConfigurationError("protobuf.createAssertDecode");
|
|
707
686
|
}
|
|
@@ -709,29 +688,25 @@ export function createAssertDecode<T>(): (input: Uint8Array) => Resolved<T> {
|
|
|
709
688
|
/**
|
|
710
689
|
* Creates a reusable {@link validateDecode} function.
|
|
711
690
|
*
|
|
712
|
-
* @danger You must configure the generic argument `T`
|
|
713
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
714
|
-
* @throws compile error
|
|
715
|
-
*
|
|
716
691
|
* @author Jeongho Nam - https://github.com/samchon
|
|
692
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
693
|
+
* @throws Compile error
|
|
694
|
+
* @danger You must configure the generic argument `T`
|
|
717
695
|
*/
|
|
718
696
|
export function createValidateDecode(): never;
|
|
719
697
|
|
|
720
698
|
/**
|
|
721
699
|
* Creates a reusable {@link validateDecode} function.
|
|
722
700
|
*
|
|
701
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
723
702
|
* @template T Target type
|
|
724
703
|
* @returns A reusable `validateDecode` function
|
|
725
|
-
*
|
|
726
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
727
704
|
*/
|
|
728
705
|
export function createValidateDecode<T>(): (
|
|
729
706
|
input: Uint8Array,
|
|
730
707
|
) => IValidation<Resolved<T>>;
|
|
731
708
|
|
|
732
|
-
/**
|
|
733
|
-
* @internal
|
|
734
|
-
*/
|
|
709
|
+
/** @internal */
|
|
735
710
|
export function createValidateDecode<T>(): (
|
|
736
711
|
input: Uint8Array,
|
|
737
712
|
) => IValidation<Resolved<T>> {
|
|
@@ -741,27 +716,23 @@ export function createValidateDecode<T>(): (
|
|
|
741
716
|
/**
|
|
742
717
|
* Creates a reusable {@link encode} function.
|
|
743
718
|
*
|
|
744
|
-
* @danger You must configure the generic argument `T`
|
|
745
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
746
|
-
* @throws compile error
|
|
747
|
-
*
|
|
748
719
|
* @author Jeongho Nam - https://github.com/samchon
|
|
720
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
721
|
+
* @throws Compile error
|
|
722
|
+
* @danger You must configure the generic argument `T`
|
|
749
723
|
*/
|
|
750
724
|
export function createEncode(): never;
|
|
751
725
|
|
|
752
726
|
/**
|
|
753
727
|
* Creates a reusable {@link encode} function.
|
|
754
728
|
*
|
|
729
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
755
730
|
* @template T Target type
|
|
756
731
|
* @returns A reusable `encode` function
|
|
757
|
-
*
|
|
758
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
759
732
|
*/
|
|
760
733
|
export function createEncode<T>(): (input: T) => Uint8Array;
|
|
761
734
|
|
|
762
|
-
/**
|
|
763
|
-
* @internal
|
|
764
|
-
*/
|
|
735
|
+
/** @internal */
|
|
765
736
|
export function createEncode<T>(): (input: T) => Uint8Array {
|
|
766
737
|
NoTransformConfigurationError("protobuf.createEncode");
|
|
767
738
|
}
|
|
@@ -769,27 +740,23 @@ export function createEncode<T>(): (input: T) => Uint8Array {
|
|
|
769
740
|
/**
|
|
770
741
|
* Creates a reusable {@link isEncode} function.
|
|
771
742
|
*
|
|
772
|
-
* @danger You must configure the generic argument `T`
|
|
773
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
774
|
-
* @throws compile error
|
|
775
|
-
*
|
|
776
743
|
* @author Jeongho Nam - https://github.com/samchon
|
|
744
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
745
|
+
* @throws Compile error
|
|
746
|
+
* @danger You must configure the generic argument `T`
|
|
777
747
|
*/
|
|
778
748
|
export function createIsEncode(): never;
|
|
779
749
|
|
|
780
750
|
/**
|
|
781
751
|
* Creates a reusable {@link isEncode} function.
|
|
782
752
|
*
|
|
753
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
783
754
|
* @template T Target type
|
|
784
755
|
* @returns A reusable `isEncode` function
|
|
785
|
-
*
|
|
786
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
787
756
|
*/
|
|
788
757
|
export function createIsEncode<T>(): (input: T) => Uint8Array | null;
|
|
789
758
|
|
|
790
|
-
/**
|
|
791
|
-
* @internal
|
|
792
|
-
*/
|
|
759
|
+
/** @internal */
|
|
793
760
|
export function createIsEncode<T>(): (input: T) => Uint8Array | null {
|
|
794
761
|
NoTransformConfigurationError("protobuf.createIsEncode");
|
|
795
762
|
}
|
|
@@ -797,12 +764,11 @@ export function createIsEncode<T>(): (input: T) => Uint8Array | null {
|
|
|
797
764
|
/**
|
|
798
765
|
* Creates a reusable {@link assertEncode} function.
|
|
799
766
|
*
|
|
800
|
-
* @
|
|
767
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
801
768
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
802
769
|
* @returns Nothing until you configure the generic argument `T`
|
|
803
|
-
* @throws
|
|
804
|
-
*
|
|
805
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
770
|
+
* @throws Compile error
|
|
771
|
+
* @danger You must configure the generic argument `T`
|
|
806
772
|
*/
|
|
807
773
|
export function createAssertEncode(
|
|
808
774
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
@@ -811,19 +777,16 @@ export function createAssertEncode(
|
|
|
811
777
|
/**
|
|
812
778
|
* Creates a reusable {@link assertEncode} function.
|
|
813
779
|
*
|
|
780
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
814
781
|
* @template T Target type
|
|
815
782
|
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
816
783
|
* @returns A reusable `assertEncode` function
|
|
817
|
-
*
|
|
818
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
819
784
|
*/
|
|
820
785
|
export function createAssertEncode<T>(
|
|
821
786
|
errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
|
|
822
787
|
): (input: T) => Uint8Array;
|
|
823
788
|
|
|
824
|
-
/**
|
|
825
|
-
* @internal
|
|
826
|
-
*/
|
|
789
|
+
/** @internal */
|
|
827
790
|
export function createAssertEncode<T>(): (input: T) => Uint8Array {
|
|
828
791
|
NoTransformConfigurationError("protobuf.createAssertEncode");
|
|
829
792
|
}
|
|
@@ -831,29 +794,25 @@ export function createAssertEncode<T>(): (input: T) => Uint8Array {
|
|
|
831
794
|
/**
|
|
832
795
|
* Creates a reusable {@link validateEncode} function.
|
|
833
796
|
*
|
|
834
|
-
* @danger You must configure the generic argument `T`
|
|
835
|
-
* @returns Nothing until you configure the generic argument `T`
|
|
836
|
-
* @throws compile error
|
|
837
|
-
*
|
|
838
797
|
* @author Jeongho Nam - https://github.com/samchon
|
|
798
|
+
* @returns Nothing until you configure the generic argument `T`
|
|
799
|
+
* @throws Compile error
|
|
800
|
+
* @danger You must configure the generic argument `T`
|
|
839
801
|
*/
|
|
840
802
|
export function createValidateEncode(): never;
|
|
841
803
|
|
|
842
804
|
/**
|
|
843
805
|
* Creates a reusable {@link validateEncode} function.
|
|
844
806
|
*
|
|
807
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
845
808
|
* @template T Target type
|
|
846
809
|
* @returns A reusable `validateEncode` function
|
|
847
|
-
*
|
|
848
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
849
810
|
*/
|
|
850
811
|
export function createValidateEncode<T>(): (
|
|
851
812
|
input: T,
|
|
852
813
|
) => IValidation<Uint8Array>;
|
|
853
814
|
|
|
854
|
-
/**
|
|
855
|
-
* @internal
|
|
856
|
-
*/
|
|
815
|
+
/** @internal */
|
|
857
816
|
export function createValidateEncode<T>(): (
|
|
858
817
|
input: T,
|
|
859
818
|
) => IValidation<Uint8Array> {
|