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
|
@@ -25,26 +25,18 @@ export namespace FeatureProgrammer {
|
|
|
25
25
|
export interface IConfig<Output extends ts.ConciseBody = ts.ConciseBody> {
|
|
26
26
|
types: IConfig.ITypes;
|
|
27
27
|
|
|
28
|
-
/**
|
|
29
|
-
* Prefix name of internal functions for specific types.
|
|
30
|
-
*/
|
|
28
|
+
/** Prefix name of internal functions for specific types. */
|
|
31
29
|
prefix: string;
|
|
32
30
|
|
|
33
|
-
/**
|
|
34
|
-
* Whether to archive access path or not.
|
|
35
|
-
*/
|
|
31
|
+
/** Whether to archive access path or not. */
|
|
36
32
|
path: boolean;
|
|
37
33
|
|
|
38
|
-
/**
|
|
39
|
-
* Whether to trace exception or not.
|
|
40
|
-
*/
|
|
34
|
+
/** Whether to trace exception or not. */
|
|
41
35
|
trace: boolean;
|
|
42
36
|
|
|
43
37
|
addition?: undefined | ((collection: MetadataCollection) => ts.Statement[]);
|
|
44
38
|
|
|
45
|
-
/**
|
|
46
|
-
* Initializer of metadata.
|
|
47
|
-
*/
|
|
39
|
+
/** Initializer of metadata. */
|
|
48
40
|
initializer: (props: {
|
|
49
41
|
context: ITypiaContext;
|
|
50
42
|
functor: FunctionProgrammer;
|
|
@@ -54,23 +46,17 @@ export namespace FeatureProgrammer {
|
|
|
54
46
|
metadata: Metadata;
|
|
55
47
|
};
|
|
56
48
|
|
|
57
|
-
/**
|
|
58
|
-
* Decoder, station of every types.
|
|
59
|
-
*/
|
|
49
|
+
/** Decoder, station of every types. */
|
|
60
50
|
decoder: (props: {
|
|
61
51
|
metadata: Metadata;
|
|
62
52
|
input: ts.Expression;
|
|
63
53
|
explore: IExplore;
|
|
64
54
|
}) => Output;
|
|
65
55
|
|
|
66
|
-
/**
|
|
67
|
-
* Object configurator.
|
|
68
|
-
*/
|
|
56
|
+
/** Object configurator. */
|
|
69
57
|
objector: IConfig.IObjector<Output>;
|
|
70
58
|
|
|
71
|
-
/**
|
|
72
|
-
* Generator of functions for object types.
|
|
73
|
-
*/
|
|
59
|
+
/** Generator of functions for object types. */
|
|
74
60
|
generator: IConfig.IGenerator;
|
|
75
61
|
}
|
|
76
62
|
export namespace IConfig {
|
|
@@ -80,27 +66,21 @@ export namespace FeatureProgrammer {
|
|
|
80
66
|
}
|
|
81
67
|
|
|
82
68
|
export interface IObjector<Output extends ts.ConciseBody = ts.ConciseBody> {
|
|
83
|
-
/**
|
|
84
|
-
* Type checker when union object type comes.
|
|
85
|
-
*/
|
|
69
|
+
/** Type checker when union object type comes. */
|
|
86
70
|
checker: (props: {
|
|
87
71
|
metadata: Metadata;
|
|
88
72
|
input: ts.Expression;
|
|
89
73
|
explore: IExplore;
|
|
90
74
|
}) => ts.Expression;
|
|
91
75
|
|
|
92
|
-
/**
|
|
93
|
-
* Decoder, function call expression generator of specific typed objects.
|
|
94
|
-
*/
|
|
76
|
+
/** Decoder, function call expression generator of specific typed objects. */
|
|
95
77
|
decoder: (props: {
|
|
96
78
|
input: ts.Expression;
|
|
97
79
|
object: MetadataObjectType;
|
|
98
80
|
explore: IExplore;
|
|
99
81
|
}) => ts.Expression;
|
|
100
82
|
|
|
101
|
-
/**
|
|
102
|
-
* Joiner of expressions from properties.
|
|
103
|
-
*/
|
|
83
|
+
/** Joiner of expressions from properties. */
|
|
104
84
|
joiner(props: {
|
|
105
85
|
entries: IExpressionEntry<Output>[];
|
|
106
86
|
input?: ts.Expression;
|
|
@@ -110,8 +90,8 @@ export namespace FeatureProgrammer {
|
|
|
110
90
|
/**
|
|
111
91
|
* Union type specificator.
|
|
112
92
|
*
|
|
113
|
-
* Expression of an algorithm specifying object type and calling
|
|
114
|
-
*
|
|
93
|
+
* Expression of an algorithm specifying object type and calling the
|
|
94
|
+
* `decoder` function of the specified object type.
|
|
115
95
|
*/
|
|
116
96
|
unionizer: (props: {
|
|
117
97
|
objects: MetadataObjectType[];
|
|
@@ -135,14 +115,14 @@ export namespace FeatureProgrammer {
|
|
|
135
115
|
* Transformer of type checking expression by discrimination.
|
|
136
116
|
*
|
|
137
117
|
* When an object type has been specified by a discrimination without full
|
|
138
|
-
* iteration, the `unionizer` will decode the object instance after
|
|
139
|
-
*
|
|
118
|
+
* iteration, the `unionizer` will decode the object instance after the
|
|
119
|
+
* last type checking.
|
|
140
120
|
*
|
|
141
121
|
* In such circumtance, you can transform the last type checking function.
|
|
142
122
|
*
|
|
123
|
+
* @deprecated
|
|
143
124
|
* @param exp Current expression about type checking
|
|
144
125
|
* @returns Transformed expression
|
|
145
|
-
* @deprecated
|
|
146
126
|
*/
|
|
147
127
|
is?: undefined | ((exp: ts.Expression) => ts.Expression);
|
|
148
128
|
|
|
@@ -150,16 +130,16 @@ export namespace FeatureProgrammer {
|
|
|
150
130
|
* Transformer of non-undefined type checking by discrimination.
|
|
151
131
|
*
|
|
152
132
|
* When specifying an union type of objects, `typia` tries to find
|
|
153
|
-
* discrimination way just by checking only one property type.
|
|
154
|
-
*
|
|
133
|
+
* discrimination way just by checking only one property type. If
|
|
134
|
+
* succeeded to find the discrimination way, `typia` will check the target
|
|
155
135
|
* property type and in the checking, non-undefined type checking would be
|
|
156
136
|
* done.
|
|
157
137
|
*
|
|
158
138
|
* In such process, you can transform the non-undefined type checking.
|
|
159
139
|
*
|
|
140
|
+
* @deprecated
|
|
160
141
|
* @param exp
|
|
161
142
|
* @returns Transformed expression
|
|
162
|
-
* @deprecated
|
|
163
143
|
*/
|
|
164
144
|
required?: undefined | ((exp: ts.Expression) => ts.Expression);
|
|
165
145
|
|
|
@@ -182,9 +162,7 @@ export namespace FeatureProgrammer {
|
|
|
182
162
|
explore: IExplore;
|
|
183
163
|
}) => ts.Expression);
|
|
184
164
|
|
|
185
|
-
/**
|
|
186
|
-
* Return type.
|
|
187
|
-
*/
|
|
165
|
+
/** Return type. */
|
|
188
166
|
type?: undefined | ts.TypeNode;
|
|
189
167
|
}
|
|
190
168
|
export interface IGenerator {
|
|
@@ -52,9 +52,7 @@ export class ImportProgrammer {
|
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
/**
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
55
|
+
/** @internal */
|
|
58
56
|
public internal(name: string): ts.PropertyAccessExpression {
|
|
59
57
|
if (name.startsWith("_") === false) name = `_${name}`;
|
|
60
58
|
return ts.factory.createPropertyAccessExpression(
|
|
@@ -66,9 +64,7 @@ export class ImportProgrammer {
|
|
|
66
64
|
);
|
|
67
65
|
}
|
|
68
66
|
|
|
69
|
-
/**
|
|
70
|
-
* @internal
|
|
71
|
-
*/
|
|
67
|
+
/** @internal */
|
|
72
68
|
public getInternalText(name: string): string {
|
|
73
69
|
if (name.startsWith("_") === false) name = `_${name}`;
|
|
74
70
|
const asset: IAsset | undefined = this.take(
|
|
@@ -78,9 +74,7 @@ export class ImportProgrammer {
|
|
|
78
74
|
return `${asset.namespace.name}.${name}`;
|
|
79
75
|
}
|
|
80
76
|
|
|
81
|
-
/**
|
|
82
|
-
* @internal
|
|
83
|
-
*/
|
|
77
|
+
/** @internal */
|
|
84
78
|
private take(file: string): IAsset {
|
|
85
79
|
return MapUtil.take(this.assets_, file, () => ({
|
|
86
80
|
file,
|
|
@@ -532,7 +532,12 @@ export namespace RandomProgrammer {
|
|
|
532
532
|
internal: "randomInteger",
|
|
533
533
|
arguments: [LiteralFactory.write(schema)],
|
|
534
534
|
};
|
|
535
|
-
}
|
|
535
|
+
} else if (props.atomic.type === "boolean")
|
|
536
|
+
return {
|
|
537
|
+
method: props.atomic.type,
|
|
538
|
+
internal: "randomBoolean",
|
|
539
|
+
arguments: [],
|
|
540
|
+
};
|
|
536
541
|
return {
|
|
537
542
|
method: props.atomic.type,
|
|
538
543
|
internal: `random${StringUtil.capitalize(props.atomic.type)}`,
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export const enum ProtobufWire {
|
|
2
2
|
/**
|
|
3
|
-
* -
|
|
4
|
-
* -
|
|
5
|
-
* -
|
|
3
|
+
* - Integers
|
|
4
|
+
* - Bool
|
|
5
|
+
* - Enum
|
|
6
6
|
*/
|
|
7
7
|
VARIANT = 0,
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
10
|
+
* - Fixed64
|
|
11
|
+
* - Sfixed64
|
|
12
|
+
* - Double
|
|
13
13
|
*/
|
|
14
14
|
I64 = 1,
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* -
|
|
18
|
-
* -
|
|
19
|
-
* -
|
|
20
|
-
* -
|
|
17
|
+
* - String
|
|
18
|
+
* - Bytes
|
|
19
|
+
* - Mebedded messages
|
|
20
|
+
* - Packed repeated fields
|
|
21
21
|
*/
|
|
22
22
|
LEN = 2,
|
|
23
23
|
|
|
@@ -26,9 +26,9 @@ export const enum ProtobufWire {
|
|
|
26
26
|
END_GROUP = 4,
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* -
|
|
30
|
-
* -
|
|
31
|
-
* -
|
|
29
|
+
* - Fixed
|
|
30
|
+
* - Sfixed32
|
|
31
|
+
* - Float
|
|
32
32
|
*/
|
|
33
33
|
I32 = 5,
|
|
34
34
|
}
|
|
@@ -8,9 +8,7 @@ import { ITypiaContext } from "../../transformers/ITypiaContext";
|
|
|
8
8
|
|
|
9
9
|
import { ICheckEntry } from "../helpers/ICheckEntry";
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
11
|
+
/** @internal */
|
|
14
12
|
export const check_array_length = (props: {
|
|
15
13
|
context: ITypiaContext;
|
|
16
14
|
array: MetadataArray;
|
|
@@ -24,9 +22,7 @@ export const check_array_length = (props: {
|
|
|
24
22
|
};
|
|
25
23
|
};
|
|
26
24
|
|
|
27
|
-
/**
|
|
28
|
-
* @internal
|
|
29
|
-
*/
|
|
25
|
+
/** @internal */
|
|
30
26
|
const check_array_type_tags = (props: {
|
|
31
27
|
context: ITypiaContext;
|
|
32
28
|
array: MetadataArray;
|
|
@@ -8,9 +8,7 @@ import { ITypiaContext } from "../../transformers/ITypiaContext";
|
|
|
8
8
|
|
|
9
9
|
import { ICheckEntry } from "../helpers/ICheckEntry";
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
11
|
+
/** @internal */
|
|
14
12
|
export const check_bigint = (props: {
|
|
15
13
|
context: ITypiaContext;
|
|
16
14
|
atomic: MetadataAtomic;
|
|
@@ -27,9 +25,7 @@ export const check_bigint = (props: {
|
|
|
27
25
|
};
|
|
28
26
|
};
|
|
29
27
|
|
|
30
|
-
/**
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
28
|
+
/** @internal */
|
|
33
29
|
const check_bigint_type_tags = (props: {
|
|
34
30
|
context: ITypiaContext;
|
|
35
31
|
atomic: MetadataAtomic;
|
|
@@ -10,9 +10,7 @@ import { check_number } from "./check_number";
|
|
|
10
10
|
import { check_string } from "./check_string";
|
|
11
11
|
import { check_template } from "./check_template";
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
13
|
+
/** @internal */
|
|
16
14
|
export const check_dynamic_key = (props: {
|
|
17
15
|
context: ITypiaContext;
|
|
18
16
|
metadata: Metadata;
|
|
@@ -181,9 +179,7 @@ export const check_dynamic_key = (props: {
|
|
|
181
179
|
: conditions.reduce(ts.factory.createLogicalOr);
|
|
182
180
|
};
|
|
183
181
|
|
|
184
|
-
/**
|
|
185
|
-
* @internal
|
|
186
|
-
*/
|
|
182
|
+
/** @internal */
|
|
187
183
|
const atomist = (entry: ICheckEntry) =>
|
|
188
184
|
[
|
|
189
185
|
...(entry.expression ? [entry.expression] : []),
|
|
@@ -11,9 +11,7 @@ import { check_dynamic_key } from "./check_dynamic_key";
|
|
|
11
11
|
import { check_everything } from "./check_everything";
|
|
12
12
|
import { check_object } from "./check_object";
|
|
13
13
|
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
14
|
+
/** @internal */
|
|
17
15
|
export const check_dynamic_properties = (props: {
|
|
18
16
|
config: check_object.IConfig;
|
|
19
17
|
context: ITypiaContext;
|
|
@@ -89,9 +87,7 @@ export const check_dynamic_properties = (props: {
|
|
|
89
87
|
: right;
|
|
90
88
|
};
|
|
91
89
|
|
|
92
|
-
/**
|
|
93
|
-
* @internal
|
|
94
|
-
*/
|
|
90
|
+
/** @internal */
|
|
95
91
|
const check_dynamic_property = (props: {
|
|
96
92
|
config: check_object.IConfig;
|
|
97
93
|
context: ITypiaContext;
|
|
@@ -207,9 +203,7 @@ const check_dynamic_property = (props: {
|
|
|
207
203
|
);
|
|
208
204
|
};
|
|
209
205
|
|
|
210
|
-
/**
|
|
211
|
-
* @internal
|
|
212
|
-
*/
|
|
206
|
+
/** @internal */
|
|
213
207
|
const is_regular_property = (regular: IExpressionEntry[]) =>
|
|
214
208
|
ts.factory.createCallExpression(
|
|
215
209
|
IdentifierFactory.access(
|
|
@@ -3,9 +3,7 @@ import ts from "typescript";
|
|
|
3
3
|
import { IdentifierFactory } from "../../factories/IdentifierFactory";
|
|
4
4
|
import { TypeFactory } from "../../factories/TypeFactory";
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
6
|
+
/** @internal */
|
|
9
7
|
export const check_everything = (array: ts.Expression) =>
|
|
10
8
|
ts.factory.createCallExpression(
|
|
11
9
|
IdentifierFactory.access(array, "every"),
|
|
@@ -2,9 +2,7 @@ import ts from "typescript";
|
|
|
2
2
|
|
|
3
3
|
import { ExpressionFactory } from "../../factories/ExpressionFactory";
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
5
|
+
/** @internal */
|
|
8
6
|
export const check_native = (props: {
|
|
9
7
|
name: string;
|
|
10
8
|
input: ts.Expression;
|
|
@@ -21,7 +19,5 @@ export const check_native = (props: {
|
|
|
21
19
|
: instanceOf;
|
|
22
20
|
};
|
|
23
21
|
|
|
24
|
-
/**
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
22
|
+
/** @internal */
|
|
27
23
|
const ATOMIC_LIKE = new Set(["Boolean", "Number", "String"]);
|
|
@@ -9,9 +9,7 @@ import { ITypiaContext } from "../../transformers/ITypiaContext";
|
|
|
9
9
|
import { ICheckEntry } from "../helpers/ICheckEntry";
|
|
10
10
|
import { OptionPredicator } from "../helpers/OptionPredicator";
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
12
|
+
/** @internal */
|
|
15
13
|
export const check_number = (props: {
|
|
16
14
|
numeric: boolean;
|
|
17
15
|
context: ITypiaContext;
|
|
@@ -56,9 +54,7 @@ export const check_number = (props: {
|
|
|
56
54
|
};
|
|
57
55
|
};
|
|
58
56
|
|
|
59
|
-
/**
|
|
60
|
-
* @internal
|
|
61
|
-
*/
|
|
57
|
+
/** @internal */
|
|
62
58
|
const check_numeric_type_tags = (props: {
|
|
63
59
|
context: ITypiaContext;
|
|
64
60
|
atomic: MetadataAtomic;
|
|
@@ -6,9 +6,7 @@ import { IExpressionEntry } from "../helpers/IExpressionEntry";
|
|
|
6
6
|
import { check_dynamic_properties } from "./check_dynamic_properties";
|
|
7
7
|
import { check_everything } from "./check_everything";
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
9
|
+
/** @internal */
|
|
12
10
|
export const check_object = (props: {
|
|
13
11
|
config: check_object.IConfig;
|
|
14
12
|
context: ITypiaContext;
|
|
@@ -45,9 +43,7 @@ export const check_object = (props: {
|
|
|
45
43
|
});
|
|
46
44
|
};
|
|
47
45
|
|
|
48
|
-
/**
|
|
49
|
-
* @internal
|
|
50
|
-
*/
|
|
46
|
+
/** @internal */
|
|
51
47
|
export namespace check_object {
|
|
52
48
|
export interface IConfig {
|
|
53
49
|
equals: boolean;
|
|
@@ -64,9 +60,7 @@ export namespace check_object {
|
|
|
64
60
|
}
|
|
65
61
|
}
|
|
66
62
|
|
|
67
|
-
/**
|
|
68
|
-
* @internal
|
|
69
|
-
*/
|
|
63
|
+
/** @internal */
|
|
70
64
|
const reduce = (props: {
|
|
71
65
|
config: check_object.IConfig;
|
|
72
66
|
expressions: ts.Expression[];
|
|
@@ -8,9 +8,7 @@ import { ITypiaContext } from "../../transformers/ITypiaContext";
|
|
|
8
8
|
|
|
9
9
|
import { ICheckEntry } from "../helpers/ICheckEntry";
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
11
|
+
/** @internal */
|
|
14
12
|
export const check_string = (props: {
|
|
15
13
|
context: ITypiaContext;
|
|
16
14
|
atomic: MetadataAtomic;
|
|
@@ -27,9 +25,7 @@ export const check_string = (props: {
|
|
|
27
25
|
};
|
|
28
26
|
};
|
|
29
27
|
|
|
30
|
-
/**
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
28
|
+
/** @internal */
|
|
33
29
|
const check_string_type_tags = (props: {
|
|
34
30
|
context: ITypiaContext;
|
|
35
31
|
atomic: MetadataAtomic;
|
|
@@ -5,9 +5,7 @@ import { MetadataTemplate } from "../../schemas/metadata/MetadataTemplate";
|
|
|
5
5
|
import { ICheckEntry } from "../helpers/ICheckEntry";
|
|
6
6
|
import { template_to_pattern } from "./template_to_pattern";
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* @internal
|
|
10
|
-
*/
|
|
8
|
+
/** @internal */
|
|
11
9
|
export const check_template = (props: {
|
|
12
10
|
templates: MetadataTemplate[];
|
|
13
11
|
input: ts.Expression;
|
|
@@ -15,9 +15,7 @@ import { CheckerProgrammer } from "../CheckerProgrammer";
|
|
|
15
15
|
import { FeatureProgrammer } from "../FeatureProgrammer";
|
|
16
16
|
import { UnionExplorer } from "../helpers/UnionExplorer";
|
|
17
17
|
|
|
18
|
-
/**
|
|
19
|
-
* @internal
|
|
20
|
-
*/
|
|
18
|
+
/** @internal */
|
|
21
19
|
export const check_union_array_like = <
|
|
22
20
|
Origin extends Metadata | MetadataArray | MetadataTuple | MetadataMap,
|
|
23
21
|
Category extends MetadataArray | MetadataTuple,
|
|
@@ -296,9 +294,7 @@ export const check_union_array_like = <
|
|
|
296
294
|
);
|
|
297
295
|
};
|
|
298
296
|
|
|
299
|
-
/**
|
|
300
|
-
* @internal
|
|
301
|
-
*/
|
|
297
|
+
/** @internal */
|
|
302
298
|
export namespace check_union_array_like {
|
|
303
299
|
export interface IConfig<
|
|
304
300
|
Category extends MetadataArray | MetadataTuple,
|
|
@@ -4,9 +4,7 @@ import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType";
|
|
|
4
4
|
|
|
5
5
|
import { FeatureProgrammer } from "../FeatureProgrammer";
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
7
|
+
/** @internal */
|
|
10
8
|
export const decode_union_object = (props: {
|
|
11
9
|
checker: (next: {
|
|
12
10
|
input: ts.Expression;
|
|
@@ -58,9 +56,7 @@ export const decode_union_object = (props: {
|
|
|
58
56
|
undefined,
|
|
59
57
|
);
|
|
60
58
|
|
|
61
|
-
/**
|
|
62
|
-
* @internal
|
|
63
|
-
*/
|
|
59
|
+
/** @internal */
|
|
64
60
|
const iterate = (props: {
|
|
65
61
|
escaper: (next: { input: ts.Expression; expected: string }) => ts.Statement;
|
|
66
62
|
unions: IUnion[];
|
|
@@ -106,9 +102,7 @@ const iterate = (props: {
|
|
|
106
102
|
return ts.factory.createBlock(statements, true);
|
|
107
103
|
};
|
|
108
104
|
|
|
109
|
-
/**
|
|
110
|
-
* @internal
|
|
111
|
-
*/
|
|
105
|
+
/** @internal */
|
|
112
106
|
interface IUnion {
|
|
113
107
|
type: string;
|
|
114
108
|
is: () => ts.Expression;
|
|
@@ -10,9 +10,7 @@ import { Escaper } from "../../utils/Escaper";
|
|
|
10
10
|
|
|
11
11
|
import { FeatureProgrammer } from "../FeatureProgrammer";
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
13
|
+
/** @internal */
|
|
16
14
|
export const feature_object_entries = <Output extends ts.ConciseBody>(props: {
|
|
17
15
|
config: Pick<FeatureProgrammer.IConfig<Output>, "decoder" | "path" | "trace">;
|
|
18
16
|
context: ITypiaContext;
|
|
@@ -5,9 +5,7 @@ import { MetadataEscaped } from "../../schemas/metadata/MetadataEscaped";
|
|
|
5
5
|
|
|
6
6
|
import { json_schema_station } from "./json_schema_station";
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* @internal
|
|
10
|
-
*/
|
|
8
|
+
/** @internal */
|
|
11
9
|
export const json_schema_escaped = (props: {
|
|
12
10
|
components: OpenApi.IComponents;
|
|
13
11
|
escaped: MetadataEscaped;
|
|
@@ -46,9 +44,7 @@ export const json_schema_escaped = (props: {
|
|
|
46
44
|
: [output];
|
|
47
45
|
};
|
|
48
46
|
|
|
49
|
-
/**
|
|
50
|
-
* @internal
|
|
51
|
-
*/
|
|
47
|
+
/** @internal */
|
|
52
48
|
const is_date = (props: {
|
|
53
49
|
visited: Set<Metadata>;
|
|
54
50
|
metadata: Metadata;
|
|
@@ -14,9 +14,7 @@ import { json_schema_station } from "./json_schema_station";
|
|
|
14
14
|
import { json_schema_title } from "./json_schema_title";
|
|
15
15
|
import { metadata_to_pattern } from "./metadata_to_pattern";
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* @internal
|
|
19
|
-
*/
|
|
17
|
+
/** @internal */
|
|
20
18
|
export const json_schema_object = (props: {
|
|
21
19
|
components: OpenApi.IComponents;
|
|
22
20
|
object: MetadataObject;
|
|
@@ -44,9 +42,7 @@ const emplace_object = (props: {
|
|
|
44
42
|
return { $ref };
|
|
45
43
|
};
|
|
46
44
|
|
|
47
|
-
/**
|
|
48
|
-
* @internal
|
|
49
|
-
*/
|
|
45
|
+
/** @internal */
|
|
50
46
|
const create_object_schema = (props: {
|
|
51
47
|
components: OpenApi.IComponents;
|
|
52
48
|
object: MetadataObject;
|
|
@@ -117,9 +113,7 @@ const create_object_schema = (props: {
|
|
|
117
113
|
};
|
|
118
114
|
};
|
|
119
115
|
|
|
120
|
-
/**
|
|
121
|
-
* @internal
|
|
122
|
-
*/
|
|
116
|
+
/** @internal */
|
|
123
117
|
const join = (props: {
|
|
124
118
|
components: OpenApi.IComponents;
|
|
125
119
|
extra: ISuperfluous;
|
|
@@ -149,9 +143,7 @@ const join = (props: {
|
|
|
149
143
|
);
|
|
150
144
|
};
|
|
151
145
|
|
|
152
|
-
/**
|
|
153
|
-
* @internal
|
|
154
|
-
*/
|
|
146
|
+
/** @internal */
|
|
155
147
|
interface ISuperfluous {
|
|
156
148
|
additionalProperties?: undefined | [Metadata, OpenApi.IJsonSchema];
|
|
157
149
|
patternProperties: Record<string, [Metadata, OpenApi.IJsonSchema]>;
|
|
@@ -4,9 +4,7 @@ import { MetadataObjectType } from "../../schemas/metadata/MetadataObjectType";
|
|
|
4
4
|
|
|
5
5
|
import { metadata_to_pattern } from "./metadata_to_pattern";
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
7
|
+
/** @internal */
|
|
10
8
|
export const prune_object_properties = (object: MetadataObjectType) => {
|
|
11
9
|
const input: ts.Expression = ts.factory.createIdentifier("input");
|
|
12
10
|
const key: ts.Expression = ts.factory.createIdentifier("key");
|
|
@@ -6,9 +6,7 @@ import { TemplateFactory } from "../../factories/TemplateFactory";
|
|
|
6
6
|
import { IExpressionEntry } from "../helpers/IExpressionEntry";
|
|
7
7
|
import { metadata_to_pattern } from "./metadata_to_pattern";
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
9
|
+
/** @internal */
|
|
12
10
|
export const stringify_dynamic_properties = (
|
|
13
11
|
dynamic: IExpressionEntry<ts.Expression>[],
|
|
14
12
|
regular: string[],
|
|
@@ -143,9 +141,7 @@ export const stringify_dynamic_properties = (
|
|
|
143
141
|
return output();
|
|
144
142
|
};
|
|
145
143
|
|
|
146
|
-
/**
|
|
147
|
-
* @internal
|
|
148
|
-
*/
|
|
144
|
+
/** @internal */
|
|
149
145
|
const stringify = (
|
|
150
146
|
entry: IExpressionEntry<ts.Expression>,
|
|
151
147
|
): ts.ReturnStatement =>
|