typia 15.0.0 → 15.1.0
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/TypeGuardError.d.ts +20 -4
- package/lib/TypeGuardError.mjs.map +1 -1
- package/lib/basic.d.ts +787 -0
- package/lib/basic.js +104 -0
- package/lib/basic.js.map +1 -0
- package/lib/basic.mjs +86 -0
- package/lib/basic.mjs.map +1 -0
- package/lib/compare.d.ts +21 -0
- package/lib/compare.js.map +1 -1
- package/lib/compare.mjs.map +1 -1
- package/lib/functional.d.ts +42 -0
- package/lib/functional.js.map +1 -1
- package/lib/functional.mjs.map +1 -1
- package/lib/http.d.ts +124 -24
- package/lib/http.js.map +1 -1
- package/lib/http.mjs.map +1 -1
- package/lib/index.mjs +2 -1
- package/lib/index.mjs.map +1 -1
- package/lib/internal/_IProtobufWriter.d.ts +115 -0
- package/lib/internal/_ProtobufReader.d.ts +159 -1
- package/lib/internal/_ProtobufReader.js +159 -1
- package/lib/internal/_ProtobufReader.js.map +1 -1
- package/lib/internal/_ProtobufReader.mjs +159 -1
- package/lib/internal/_ProtobufReader.mjs.map +1 -1
- package/lib/internal/_ProtobufSizer.d.ts +135 -4
- package/lib/internal/_ProtobufSizer.js +134 -2
- package/lib/internal/_ProtobufSizer.js.map +1 -1
- package/lib/internal/_ProtobufSizer.mjs +133 -2
- package/lib/internal/_ProtobufSizer.mjs.map +1 -1
- package/lib/internal/_ProtobufWriter.d.ts +151 -0
- package/lib/internal/_ProtobufWriter.js +154 -1
- package/lib/internal/_ProtobufWriter.js.map +1 -1
- package/lib/internal/_ProtobufWriter.mjs +153 -2
- package/lib/internal/_ProtobufWriter.mjs.map +1 -1
- package/lib/internal/_accessExpressionAsString.d.ts +11 -0
- package/lib/internal/_accessExpressionAsString.js +11 -0
- package/lib/internal/_accessExpressionAsString.js.map +1 -1
- package/lib/internal/_accessExpressionAsString.mjs +11 -0
- package/lib/internal/_accessExpressionAsString.mjs.map +1 -1
- package/lib/internal/_assertGuard.d.ts +12 -0
- package/lib/internal/_assertGuard.js +12 -0
- package/lib/internal/_assertGuard.js.map +1 -1
- package/lib/internal/_assertGuard.mjs +12 -0
- package/lib/internal/_assertGuard.mjs.map +1 -1
- package/lib/internal/_coerceLlmArguments.d.ts +10 -0
- package/lib/internal/_coerceLlmArguments.js +10 -0
- package/lib/internal/_coerceLlmArguments.js.map +1 -1
- package/lib/internal/_coerceLlmArguments.mjs +10 -0
- package/lib/internal/_coerceLlmArguments.mjs.map +1 -1
- package/lib/internal/_createLlmEvaluation.js +9 -46
- package/lib/internal/_createLlmEvaluation.js.map +1 -1
- package/lib/internal/_createLlmEvaluation.mjs +7 -35
- package/lib/internal/_createLlmEvaluation.mjs.map +1 -1
- package/lib/internal/_createStandardSchema.d.ts +13 -0
- package/lib/internal/_createStandardSchema.js +13 -0
- package/lib/internal/_createStandardSchema.js.map +1 -1
- package/lib/internal/_createStandardSchema.mjs +13 -0
- package/lib/internal/_createStandardSchema.mjs.map +1 -1
- package/lib/internal/_decimal.d.ts +75 -0
- package/lib/internal/_decimal.js +55 -0
- package/lib/internal/_decimal.js.map +1 -1
- package/lib/internal/_decimal.mjs +55 -0
- package/lib/internal/_decimal.mjs.map +1 -1
- package/lib/internal/_functionalTypeGuardErrorFactory.d.ts +8 -0
- package/lib/internal/_functionalTypeGuardErrorFactory.js +8 -0
- package/lib/internal/_functionalTypeGuardErrorFactory.js.map +1 -1
- package/lib/internal/_functionalTypeGuardErrorFactory.mjs +8 -0
- package/lib/internal/_functionalTypeGuardErrorFactory.mjs.map +1 -1
- package/lib/internal/_httpFormDataReadArray.d.ts +9 -0
- package/lib/internal/_httpFormDataReadArray.js +9 -0
- package/lib/internal/_httpFormDataReadArray.js.map +1 -1
- package/lib/internal/_httpFormDataReadArray.mjs +9 -0
- package/lib/internal/_httpFormDataReadArray.mjs.map +1 -1
- package/lib/internal/_httpFormDataReadBigint.d.ts +12 -0
- package/lib/internal/_httpFormDataReadBigint.js +19 -5
- package/lib/internal/_httpFormDataReadBigint.js.map +1 -1
- package/lib/internal/_httpFormDataReadBigint.mjs +13 -1
- package/lib/internal/_httpFormDataReadBigint.mjs.map +1 -1
- package/lib/internal/_httpFormDataReadBlob.d.ts +11 -0
- package/lib/internal/_httpFormDataReadBlob.js +11 -0
- package/lib/internal/_httpFormDataReadBlob.js.map +1 -1
- package/lib/internal/_httpFormDataReadBlob.mjs +11 -0
- package/lib/internal/_httpFormDataReadBlob.mjs.map +1 -1
- package/lib/internal/_httpFormDataReadBoolean.d.ts +11 -0
- package/lib/internal/_httpFormDataReadBoolean.js +23 -10
- package/lib/internal/_httpFormDataReadBoolean.js.map +1 -1
- package/lib/internal/_httpFormDataReadBoolean.mjs +12 -1
- package/lib/internal/_httpFormDataReadBoolean.mjs.map +1 -1
- package/lib/internal/_httpFormDataReadFile.d.ts +11 -0
- package/lib/internal/_httpFormDataReadFile.js +11 -0
- package/lib/internal/_httpFormDataReadFile.js.map +1 -1
- package/lib/internal/_httpFormDataReadFile.mjs +11 -0
- package/lib/internal/_httpFormDataReadFile.mjs.map +1 -1
- package/lib/internal/_httpFormDataReadNumber.d.ts +11 -0
- package/lib/internal/_httpFormDataReadNumber.js +18 -5
- package/lib/internal/_httpFormDataReadNumber.js.map +1 -1
- package/lib/internal/_httpFormDataReadNumber.mjs +12 -1
- package/lib/internal/_httpFormDataReadNumber.mjs.map +1 -1
- package/lib/internal/_httpFormDataReadString.d.ts +14 -1
- package/lib/internal/_httpFormDataReadString.js +15 -2
- package/lib/internal/_httpFormDataReadString.js.map +1 -1
- package/lib/internal/_httpFormDataReadString.mjs +14 -1
- package/lib/internal/_httpFormDataReadString.mjs.map +1 -1
- package/lib/internal/_httpHeaderReadBigint.d.ts +11 -0
- package/lib/internal/_httpHeaderReadBigint.js +16 -1
- package/lib/internal/_httpHeaderReadBigint.js.map +1 -1
- package/lib/internal/_httpHeaderReadBigint.mjs +13 -1
- package/lib/internal/_httpHeaderReadBigint.mjs.map +1 -1
- package/lib/internal/_httpHeaderReadBoolean.d.ts +12 -0
- package/lib/internal/_httpHeaderReadBoolean.js +12 -0
- package/lib/internal/_httpHeaderReadBoolean.js.map +1 -1
- package/lib/internal/_httpHeaderReadBoolean.mjs +12 -0
- package/lib/internal/_httpHeaderReadBoolean.mjs.map +1 -1
- package/lib/internal/_httpHeaderReadNumber.d.ts +11 -0
- package/lib/internal/_httpHeaderReadNumber.js +16 -1
- package/lib/internal/_httpHeaderReadNumber.js.map +1 -1
- package/lib/internal/_httpHeaderReadNumber.mjs +13 -1
- package/lib/internal/_httpHeaderReadNumber.mjs.map +1 -1
- package/lib/internal/_httpParameterReadBigint.d.ts +11 -0
- package/lib/internal/_httpParameterReadBigint.js +15 -0
- package/lib/internal/_httpParameterReadBigint.js.map +1 -1
- package/lib/internal/_httpParameterReadBigint.mjs +12 -0
- package/lib/internal/_httpParameterReadBigint.mjs.map +1 -1
- package/lib/internal/_httpParameterReadBoolean.d.ts +11 -0
- package/lib/internal/_httpParameterReadBoolean.js +11 -0
- package/lib/internal/_httpParameterReadBoolean.js.map +1 -1
- package/lib/internal/_httpParameterReadBoolean.mjs +11 -0
- package/lib/internal/_httpParameterReadBoolean.mjs.map +1 -1
- package/lib/internal/_httpParameterReadNumber.d.ts +11 -0
- package/lib/internal/_httpParameterReadNumber.js +15 -0
- package/lib/internal/_httpParameterReadNumber.js.map +1 -1
- package/lib/internal/_httpParameterReadNumber.mjs +12 -0
- package/lib/internal/_httpParameterReadNumber.mjs.map +1 -1
- package/lib/internal/_httpParameterReadString.d.ts +14 -1
- package/lib/internal/_httpParameterReadString.js +14 -1
- package/lib/internal/_httpParameterReadString.js.map +1 -1
- package/lib/internal/_httpParameterReadString.mjs +14 -1
- package/lib/internal/_httpParameterReadString.mjs.map +1 -1
- package/lib/internal/_httpQueryParseURLSearchParams.d.ts +14 -0
- package/lib/internal/_httpQueryParseURLSearchParams.js +14 -0
- package/lib/internal/_httpQueryParseURLSearchParams.js.map +1 -1
- package/lib/internal/_httpQueryParseURLSearchParams.mjs +14 -0
- package/lib/internal/_httpQueryParseURLSearchParams.mjs.map +1 -1
- package/lib/internal/_httpQueryReadArray.d.ts +9 -0
- package/lib/internal/_httpQueryReadArray.js +9 -0
- package/lib/internal/_httpQueryReadArray.js.map +1 -1
- package/lib/internal/_httpQueryReadArray.mjs +9 -0
- package/lib/internal/_httpQueryReadArray.mjs.map +1 -1
- package/lib/internal/_httpQueryReadBigint.d.ts +11 -0
- package/lib/internal/_httpQueryReadBigint.js +19 -1
- package/lib/internal/_httpQueryReadBigint.js.map +1 -1
- package/lib/internal/_httpQueryReadBigint.mjs +12 -1
- package/lib/internal/_httpQueryReadBigint.mjs.map +1 -1
- package/lib/internal/_httpQueryReadBoolean.d.ts +12 -0
- package/lib/internal/_httpQueryReadBoolean.js +16 -1
- package/lib/internal/_httpQueryReadBoolean.js.map +1 -1
- package/lib/internal/_httpQueryReadBoolean.mjs +13 -1
- package/lib/internal/_httpQueryReadBoolean.mjs.map +1 -1
- package/lib/internal/_httpQueryReadNumber.d.ts +11 -0
- package/lib/internal/_httpQueryReadNumber.js +19 -1
- package/lib/internal/_httpQueryReadNumber.js.map +1 -1
- package/lib/internal/_httpQueryReadNumber.mjs +12 -1
- package/lib/internal/_httpQueryReadNumber.mjs.map +1 -1
- package/lib/internal/_httpQueryReadString.d.ts +14 -1
- package/lib/internal/_httpQueryReadString.js +14 -1
- package/lib/internal/_httpQueryReadString.js.map +1 -1
- package/lib/internal/_httpQueryReadString.mjs +14 -1
- package/lib/internal/_httpQueryReadString.mjs.map +1 -1
- package/lib/internal/_isBetween.d.ts +8 -0
- package/lib/internal/_isBetween.js +8 -0
- package/lib/internal/_isBetween.js.map +1 -1
- package/lib/internal/_isBetween.mjs +8 -0
- package/lib/internal/_isBetween.mjs.map +1 -1
- package/lib/internal/_isBigintString.d.ts +11 -0
- package/lib/internal/_isBigintString.js +11 -0
- package/lib/internal/_isBigintString.js.map +1 -1
- package/lib/internal/_isBigintString.mjs +11 -0
- package/lib/internal/_isBigintString.mjs.map +1 -1
- package/lib/internal/_isFormatByte.d.ts +12 -0
- package/lib/internal/_isFormatByte.js +12 -0
- package/lib/internal/_isFormatByte.js.map +1 -1
- package/lib/internal/_isFormatByte.mjs +12 -0
- package/lib/internal/_isFormatByte.mjs.map +1 -1
- package/lib/internal/_isFormatDate.d.ts +11 -0
- package/lib/internal/_isFormatDate.js +11 -0
- package/lib/internal/_isFormatDate.js.map +1 -1
- package/lib/internal/_isFormatDate.mjs +11 -0
- package/lib/internal/_isFormatDate.mjs.map +1 -1
- package/lib/internal/_isFormatDateTime.d.ts +13 -0
- package/lib/internal/_isFormatDateTime.js +13 -0
- package/lib/internal/_isFormatDateTime.js.map +1 -1
- package/lib/internal/_isFormatDateTime.mjs +13 -0
- package/lib/internal/_isFormatDateTime.mjs.map +1 -1
- package/lib/internal/_isFormatDuration.d.ts +13 -0
- package/lib/internal/_isFormatDuration.js +13 -0
- package/lib/internal/_isFormatDuration.js.map +1 -1
- package/lib/internal/_isFormatDuration.mjs +13 -0
- package/lib/internal/_isFormatDuration.mjs.map +1 -1
- package/lib/internal/_isFormatEmail.d.ts +13 -0
- package/lib/internal/_isFormatEmail.js +13 -0
- package/lib/internal/_isFormatEmail.js.map +1 -1
- package/lib/internal/_isFormatEmail.mjs +13 -0
- package/lib/internal/_isFormatEmail.mjs.map +1 -1
- package/lib/internal/_isFormatHostname.d.ts +12 -0
- package/lib/internal/_isFormatHostname.js +12 -0
- package/lib/internal/_isFormatHostname.js.map +1 -1
- package/lib/internal/_isFormatHostname.mjs +12 -0
- package/lib/internal/_isFormatHostname.mjs.map +1 -1
- package/lib/internal/_isFormatIdnEmail.d.ts +14 -0
- package/lib/internal/_isFormatIdnEmail.js +14 -0
- package/lib/internal/_isFormatIdnEmail.js.map +1 -1
- package/lib/internal/_isFormatIdnEmail.mjs +14 -0
- package/lib/internal/_isFormatIdnEmail.mjs.map +1 -1
- package/lib/internal/_isFormatIdnHostname.d.ts +14 -0
- package/lib/internal/_isFormatIdnHostname.js +14 -0
- package/lib/internal/_isFormatIdnHostname.js.map +1 -1
- package/lib/internal/_isFormatIdnHostname.mjs +14 -0
- package/lib/internal/_isFormatIdnHostname.mjs.map +1 -1
- package/lib/internal/_isFormatIpv4.d.ts +11 -0
- package/lib/internal/_isFormatIpv4.js +11 -0
- package/lib/internal/_isFormatIpv4.js.map +1 -1
- package/lib/internal/_isFormatIpv4.mjs +11 -0
- package/lib/internal/_isFormatIpv4.mjs.map +1 -1
- package/lib/internal/_isFormatIpv6.d.ts +12 -0
- package/lib/internal/_isFormatIpv6.js +12 -0
- package/lib/internal/_isFormatIpv6.js.map +1 -1
- package/lib/internal/_isFormatIpv6.mjs +12 -0
- package/lib/internal/_isFormatIpv6.mjs.map +1 -1
- package/lib/internal/_isFormatIri.d.ts +11 -0
- package/lib/internal/_isFormatIri.js +11 -0
- package/lib/internal/_isFormatIri.js.map +1 -1
- package/lib/internal/_isFormatIri.mjs +11 -0
- package/lib/internal/_isFormatIri.mjs.map +1 -1
- package/lib/internal/_isFormatIriReference.d.ts +13 -0
- package/lib/internal/_isFormatIriReference.js +13 -0
- package/lib/internal/_isFormatIriReference.js.map +1 -1
- package/lib/internal/_isFormatIriReference.mjs +13 -0
- package/lib/internal/_isFormatIriReference.mjs.map +1 -1
- package/lib/internal/_isFormatJsonPointer.d.ts +11 -0
- package/lib/internal/_isFormatJsonPointer.js +11 -0
- package/lib/internal/_isFormatJsonPointer.js.map +1 -1
- package/lib/internal/_isFormatJsonPointer.mjs +11 -0
- package/lib/internal/_isFormatJsonPointer.mjs.map +1 -1
- package/lib/internal/_isFormatPassword.d.ts +11 -0
- package/lib/internal/_isFormatPassword.js +11 -0
- package/lib/internal/_isFormatPassword.js.map +1 -1
- package/lib/internal/_isFormatPassword.mjs +11 -0
- package/lib/internal/_isFormatPassword.mjs.map +1 -1
- package/lib/internal/_isFormatRegex.d.ts +11 -0
- package/lib/internal/_isFormatRegex.js +11 -0
- package/lib/internal/_isFormatRegex.js.map +1 -1
- package/lib/internal/_isFormatRegex.mjs +11 -0
- package/lib/internal/_isFormatRegex.mjs.map +1 -1
- package/lib/internal/_isFormatRelativeJsonPointer.d.ts +11 -0
- package/lib/internal/_isFormatRelativeJsonPointer.js +11 -0
- package/lib/internal/_isFormatRelativeJsonPointer.js.map +1 -1
- package/lib/internal/_isFormatRelativeJsonPointer.mjs +11 -0
- package/lib/internal/_isFormatRelativeJsonPointer.mjs.map +1 -1
- package/lib/internal/_isFormatTime.d.ts +12 -0
- package/lib/internal/_isFormatTime.js +12 -0
- package/lib/internal/_isFormatTime.js.map +1 -1
- package/lib/internal/_isFormatTime.mjs +12 -0
- package/lib/internal/_isFormatTime.mjs.map +1 -1
- package/lib/internal/_isFormatUri.d.ts +15 -0
- package/lib/internal/_isFormatUri.js +15 -0
- package/lib/internal/_isFormatUri.js.map +1 -1
- package/lib/internal/_isFormatUri.mjs +15 -0
- package/lib/internal/_isFormatUri.mjs.map +1 -1
- package/lib/internal/_isFormatUriReference.d.ts +11 -0
- package/lib/internal/_isFormatUriReference.js +11 -0
- package/lib/internal/_isFormatUriReference.js.map +1 -1
- package/lib/internal/_isFormatUriReference.mjs +11 -0
- package/lib/internal/_isFormatUriReference.mjs.map +1 -1
- package/lib/internal/_isFormatUriTemplate.d.ts +13 -0
- package/lib/internal/_isFormatUriTemplate.js +14 -1
- package/lib/internal/_isFormatUriTemplate.js.map +1 -1
- package/lib/internal/_isFormatUriTemplate.mjs +14 -1
- package/lib/internal/_isFormatUriTemplate.mjs.map +1 -1
- package/lib/internal/_isFormatUrl.d.ts +15 -0
- package/lib/internal/_isFormatUrl.js +15 -0
- package/lib/internal/_isFormatUrl.js.map +1 -1
- package/lib/internal/_isFormatUrl.mjs +15 -0
- package/lib/internal/_isFormatUrl.mjs.map +1 -1
- package/lib/internal/_isFormatUuid.d.ts +11 -0
- package/lib/internal/_isFormatUuid.js +11 -0
- package/lib/internal/_isFormatUuid.js.map +1 -1
- package/lib/internal/_isFormatUuid.mjs +11 -0
- package/lib/internal/_isFormatUuid.mjs.map +1 -1
- package/lib/internal/_isMultipleOf.d.ts +11 -0
- package/lib/internal/_isMultipleOf.js +11 -0
- package/lib/internal/_isMultipleOf.js.map +1 -1
- package/lib/internal/_isMultipleOf.mjs +11 -0
- package/lib/internal/_isMultipleOf.mjs.map +1 -1
- package/lib/internal/_isTypeFloat.d.ts +9 -0
- package/lib/internal/_isTypeFloat.js +9 -0
- package/lib/internal/_isTypeFloat.js.map +1 -1
- package/lib/internal/_isTypeFloat.mjs +9 -0
- package/lib/internal/_isTypeFloat.mjs.map +1 -1
- package/lib/internal/_isTypeInt16.d.ts +8 -0
- package/lib/internal/_isTypeInt16.js +8 -0
- package/lib/internal/_isTypeInt16.js.map +1 -1
- package/lib/internal/_isTypeInt16.mjs +8 -0
- package/lib/internal/_isTypeInt16.mjs.map +1 -1
- package/lib/internal/_isTypeInt32.d.ts +8 -0
- package/lib/internal/_isTypeInt32.js +8 -0
- package/lib/internal/_isTypeInt32.js.map +1 -1
- package/lib/internal/_isTypeInt32.mjs +8 -0
- package/lib/internal/_isTypeInt32.mjs.map +1 -1
- package/lib/internal/_isTypeInt64.d.ts +11 -0
- package/lib/internal/_isTypeInt64.js +11 -0
- package/lib/internal/_isTypeInt64.js.map +1 -1
- package/lib/internal/_isTypeInt64.mjs +11 -0
- package/lib/internal/_isTypeInt64.mjs.map +1 -1
- package/lib/internal/_isTypeInt64Bigint.d.ts +8 -0
- package/lib/internal/_isTypeInt64Bigint.js +8 -0
- package/lib/internal/_isTypeInt64Bigint.js.map +1 -1
- package/lib/internal/_isTypeInt64Bigint.mjs +8 -0
- package/lib/internal/_isTypeInt64Bigint.mjs.map +1 -1
- package/lib/internal/_isTypeInt8.d.ts +8 -0
- package/lib/internal/_isTypeInt8.js +8 -0
- package/lib/internal/_isTypeInt8.js.map +1 -1
- package/lib/internal/_isTypeInt8.mjs +8 -0
- package/lib/internal/_isTypeInt8.mjs.map +1 -1
- package/lib/internal/_isTypeUint16.d.ts +8 -0
- package/lib/internal/_isTypeUint16.js +8 -0
- package/lib/internal/_isTypeUint16.js.map +1 -1
- package/lib/internal/_isTypeUint16.mjs +8 -0
- package/lib/internal/_isTypeUint16.mjs.map +1 -1
- package/lib/internal/_isTypeUint32.d.ts +8 -0
- package/lib/internal/_isTypeUint32.js +8 -0
- package/lib/internal/_isTypeUint32.js.map +1 -1
- package/lib/internal/_isTypeUint32.mjs +8 -0
- package/lib/internal/_isTypeUint32.mjs.map +1 -1
- package/lib/internal/_isTypeUint64.d.ts +11 -0
- package/lib/internal/_isTypeUint64.js +11 -0
- package/lib/internal/_isTypeUint64.js.map +1 -1
- package/lib/internal/_isTypeUint64.mjs +11 -0
- package/lib/internal/_isTypeUint64.mjs.map +1 -1
- package/lib/internal/_isTypeUint64Bigint.d.ts +8 -0
- package/lib/internal/_isTypeUint64Bigint.js +8 -0
- package/lib/internal/_isTypeUint64Bigint.js.map +1 -1
- package/lib/internal/_isTypeUint64Bigint.mjs +8 -0
- package/lib/internal/_isTypeUint64Bigint.mjs.map +1 -1
- package/lib/internal/_isTypeUint8.d.ts +8 -0
- package/lib/internal/_isTypeUint8.js +8 -0
- package/lib/internal/_isTypeUint8.js.map +1 -1
- package/lib/internal/_isTypeUint8.mjs +8 -0
- package/lib/internal/_isTypeUint8.mjs.map +1 -1
- package/lib/internal/_isUniqueItems.d.ts +17 -0
- package/lib/internal/_isUniqueItems.js +58 -0
- package/lib/internal/_isUniqueItems.js.map +1 -1
- package/lib/internal/_isUniqueItems.mjs +41 -0
- package/lib/internal/_isUniqueItems.mjs.map +1 -1
- package/lib/internal/_jsonStringifyArray.js +2 -0
- package/lib/internal/_jsonStringifyArray.js.map +1 -1
- package/lib/internal/_jsonStringifyArray.mjs +2 -0
- package/lib/internal/_jsonStringifyArray.mjs.map +1 -1
- package/lib/internal/_jsonStringifyElement.js +2 -0
- package/lib/internal/_jsonStringifyElement.js.map +1 -1
- package/lib/internal/_jsonStringifyElement.mjs +2 -0
- package/lib/internal/_jsonStringifyElement.mjs.map +1 -1
- package/lib/internal/_jsonStringifyNumber.d.ts +9 -0
- package/lib/internal/_jsonStringifyNumber.js +9 -0
- package/lib/internal/_jsonStringifyNumber.js.map +1 -1
- package/lib/internal/_jsonStringifyNumber.mjs +9 -0
- package/lib/internal/_jsonStringifyNumber.mjs.map +1 -1
- package/lib/internal/_jsonStringifyProperty.js +3 -1
- package/lib/internal/_jsonStringifyProperty.js.map +1 -1
- package/lib/internal/_jsonStringifyProperty.mjs +3 -1
- package/lib/internal/_jsonStringifyProperty.mjs.map +1 -1
- package/lib/internal/_jsonStringifyRest.d.ts +11 -0
- package/lib/internal/_jsonStringifyRest.js +11 -0
- package/lib/internal/_jsonStringifyRest.js.map +1 -1
- package/lib/internal/_jsonStringifyRest.mjs +11 -0
- package/lib/internal/_jsonStringifyRest.mjs.map +1 -1
- package/lib/internal/_jsonStringifyString.d.ts +13 -0
- package/lib/internal/_jsonStringifyString.js +13 -0
- package/lib/internal/_jsonStringifyString.js.map +1 -1
- package/lib/internal/_jsonStringifyString.mjs +13 -0
- package/lib/internal/_jsonStringifyString.mjs.map +1 -1
- package/lib/internal/_jsonStringifyTail.d.ts +8 -0
- package/lib/internal/_jsonStringifyTail.js +8 -0
- package/lib/internal/_jsonStringifyTail.js.map +1 -1
- package/lib/internal/_jsonStringifyTail.mjs +8 -0
- package/lib/internal/_jsonStringifyTail.mjs.map +1 -1
- package/lib/internal/_llmApplicationFinalize.d.ts +13 -0
- package/lib/internal/_llmApplicationFinalize.js +13 -0
- package/lib/internal/_llmApplicationFinalize.js.map +1 -1
- package/lib/internal/_llmApplicationFinalize.mjs +13 -0
- package/lib/internal/_llmApplicationFinalize.mjs.map +1 -1
- package/lib/internal/_notationAny.d.ts +14 -0
- package/lib/internal/_notationAny.js +14 -0
- package/lib/internal/_notationAny.js.map +1 -1
- package/lib/internal/_notationAny.mjs +14 -0
- package/lib/internal/_notationAny.mjs.map +1 -1
- package/lib/internal/_notationAssign.d.ts +12 -0
- package/lib/internal/_notationAssign.js +12 -0
- package/lib/internal/_notationAssign.js.map +1 -1
- package/lib/internal/_notationAssign.mjs +12 -0
- package/lib/internal/_notationAssign.mjs.map +1 -1
- package/lib/internal/_notationKebab.d.ts +9 -0
- package/lib/internal/_notationKebab.js +9 -0
- package/lib/internal/_notationKebab.js.map +1 -1
- package/lib/internal/_notationKebab.mjs +9 -0
- package/lib/internal/_notationKebab.mjs.map +1 -1
- package/lib/internal/_notationKeyCollision.d.ts +8 -0
- package/lib/internal/_notationKeyCollision.js +8 -0
- package/lib/internal/_notationKeyCollision.js.map +1 -1
- package/lib/internal/_notationKeyCollision.mjs +8 -0
- package/lib/internal/_notationKeyCollision.mjs.map +1 -1
- package/lib/internal/_notationSnake.d.ts +12 -0
- package/lib/internal/_notationSnake.js +12 -0
- package/lib/internal/_notationSnake.js.map +1 -1
- package/lib/internal/_notationSnake.mjs +12 -0
- package/lib/internal/_notationSnake.mjs.map +1 -1
- package/lib/internal/_parseLlmArguments.d.ts +12 -0
- package/lib/internal/_parseLlmArguments.js +12 -0
- package/lib/internal/_parseLlmArguments.js.map +1 -1
- package/lib/internal/_parseLlmArguments.mjs +12 -0
- package/lib/internal/_parseLlmArguments.mjs.map +1 -1
- package/lib/internal/_plainCloneAny.d.ts +15 -0
- package/lib/internal/_plainCloneAny.js +15 -0
- package/lib/internal/_plainCloneAny.js.map +1 -1
- package/lib/internal/_plainCloneAny.mjs +15 -0
- package/lib/internal/_plainCloneAny.mjs.map +1 -1
- package/lib/internal/_randomArray.d.ts +19 -1
- package/lib/internal/_randomArray.js +32 -14
- package/lib/internal/_randomArray.js.map +1 -1
- package/lib/internal/_randomArray.mjs +24 -6
- package/lib/internal/_randomArray.mjs.map +1 -1
- package/lib/internal/_randomBigint.d.ts +17 -1
- package/lib/internal/_randomBigint.js +95 -2
- package/lib/internal/_randomBigint.js.map +1 -1
- package/lib/internal/_randomBigint.mjs +75 -2
- package/lib/internal/_randomBigint.mjs.map +1 -1
- package/lib/internal/_randomBoolean.d.ts +8 -0
- package/lib/internal/_randomBoolean.js +8 -0
- package/lib/internal/_randomBoolean.js.map +1 -1
- package/lib/internal/_randomBoolean.mjs +8 -0
- package/lib/internal/_randomBoolean.mjs.map +1 -1
- package/lib/internal/_randomFormatByte.d.ts +8 -0
- package/lib/internal/_randomFormatByte.js +8 -0
- package/lib/internal/_randomFormatByte.js.map +1 -1
- package/lib/internal/_randomFormatByte.mjs +8 -0
- package/lib/internal/_randomFormatByte.mjs.map +1 -1
- package/lib/internal/_randomFormatDate.d.ts +10 -0
- package/lib/internal/_randomFormatDate.js +10 -0
- package/lib/internal/_randomFormatDate.js.map +1 -1
- package/lib/internal/_randomFormatDate.mjs +10 -0
- package/lib/internal/_randomFormatDate.mjs.map +1 -1
- package/lib/internal/_randomFormatDatetime.d.ts +10 -0
- package/lib/internal/_randomFormatDatetime.js +10 -0
- package/lib/internal/_randomFormatDatetime.js.map +1 -1
- package/lib/internal/_randomFormatDatetime.mjs +10 -0
- package/lib/internal/_randomFormatDatetime.mjs.map +1 -1
- package/lib/internal/_randomFormatDuration.d.ts +8 -0
- package/lib/internal/_randomFormatDuration.js +8 -0
- package/lib/internal/_randomFormatDuration.js.map +1 -1
- package/lib/internal/_randomFormatDuration.mjs +8 -0
- package/lib/internal/_randomFormatDuration.mjs.map +1 -1
- package/lib/internal/_randomFormatEmail.d.ts +8 -0
- package/lib/internal/_randomFormatEmail.js +8 -0
- package/lib/internal/_randomFormatEmail.js.map +1 -1
- package/lib/internal/_randomFormatEmail.mjs +8 -0
- package/lib/internal/_randomFormatEmail.mjs.map +1 -1
- package/lib/internal/_randomFormatHostname.d.ts +15 -1
- package/lib/internal/_randomFormatHostname.js +15 -1
- package/lib/internal/_randomFormatHostname.js.map +1 -1
- package/lib/internal/_randomFormatHostname.mjs +15 -1
- package/lib/internal/_randomFormatHostname.mjs.map +1 -1
- package/lib/internal/_randomFormatIdnEmail.d.ts +13 -0
- package/lib/internal/_randomFormatIdnEmail.js +13 -0
- package/lib/internal/_randomFormatIdnEmail.js.map +1 -1
- package/lib/internal/_randomFormatIdnEmail.mjs +13 -0
- package/lib/internal/_randomFormatIdnEmail.mjs.map +1 -1
- package/lib/internal/_randomFormatIdnHostname.d.ts +12 -0
- package/lib/internal/_randomFormatIdnHostname.js +12 -0
- package/lib/internal/_randomFormatIdnHostname.js.map +1 -1
- package/lib/internal/_randomFormatIdnHostname.mjs +12 -0
- package/lib/internal/_randomFormatIdnHostname.mjs.map +1 -1
- package/lib/internal/_randomFormatIpv4.d.ts +8 -0
- package/lib/internal/_randomFormatIpv4.js +8 -0
- package/lib/internal/_randomFormatIpv4.js.map +1 -1
- package/lib/internal/_randomFormatIpv4.mjs +8 -0
- package/lib/internal/_randomFormatIpv4.mjs.map +1 -1
- package/lib/internal/_randomFormatIpv6.d.ts +8 -0
- package/lib/internal/_randomFormatIpv6.js +8 -0
- package/lib/internal/_randomFormatIpv6.js.map +1 -1
- package/lib/internal/_randomFormatIpv6.mjs +8 -0
- package/lib/internal/_randomFormatIpv6.mjs.map +1 -1
- package/lib/internal/_randomFormatIri.d.ts +11 -0
- package/lib/internal/_randomFormatIri.js +11 -0
- package/lib/internal/_randomFormatIri.js.map +1 -1
- package/lib/internal/_randomFormatIri.mjs +11 -0
- package/lib/internal/_randomFormatIri.mjs.map +1 -1
- package/lib/internal/_randomFormatIriReference.d.ts +12 -0
- package/lib/internal/_randomFormatIriReference.js +12 -0
- package/lib/internal/_randomFormatIriReference.js.map +1 -1
- package/lib/internal/_randomFormatIriReference.mjs +12 -0
- package/lib/internal/_randomFormatIriReference.mjs.map +1 -1
- package/lib/internal/_randomFormatJsonPointer.d.ts +12 -0
- package/lib/internal/_randomFormatJsonPointer.js +12 -0
- package/lib/internal/_randomFormatJsonPointer.js.map +1 -1
- package/lib/internal/_randomFormatJsonPointer.mjs +12 -0
- package/lib/internal/_randomFormatJsonPointer.mjs.map +1 -1
- package/lib/internal/_randomFormatPassword.d.ts +13 -0
- package/lib/internal/_randomFormatPassword.js +13 -0
- package/lib/internal/_randomFormatPassword.js.map +1 -1
- package/lib/internal/_randomFormatPassword.mjs +13 -0
- package/lib/internal/_randomFormatPassword.mjs.map +1 -1
- package/lib/internal/_randomFormatRegex.d.ts +8 -0
- package/lib/internal/_randomFormatRegex.js +8 -0
- package/lib/internal/_randomFormatRegex.js.map +1 -1
- package/lib/internal/_randomFormatRegex.mjs +8 -0
- package/lib/internal/_randomFormatRegex.mjs.map +1 -1
- package/lib/internal/_randomFormatRelativeJsonPointer.d.ts +8 -0
- package/lib/internal/_randomFormatRelativeJsonPointer.js +8 -0
- package/lib/internal/_randomFormatRelativeJsonPointer.js.map +1 -1
- package/lib/internal/_randomFormatRelativeJsonPointer.mjs +8 -0
- package/lib/internal/_randomFormatRelativeJsonPointer.mjs.map +1 -1
- package/lib/internal/_randomFormatTime.d.ts +13 -0
- package/lib/internal/_randomFormatTime.js +13 -0
- package/lib/internal/_randomFormatTime.js.map +1 -1
- package/lib/internal/_randomFormatTime.mjs +13 -0
- package/lib/internal/_randomFormatTime.mjs.map +1 -1
- package/lib/internal/_randomFormatUri.d.ts +12 -0
- package/lib/internal/_randomFormatUri.js +12 -0
- package/lib/internal/_randomFormatUri.js.map +1 -1
- package/lib/internal/_randomFormatUri.mjs +12 -0
- package/lib/internal/_randomFormatUri.mjs.map +1 -1
- package/lib/internal/_randomFormatUriReference.d.ts +12 -0
- package/lib/internal/_randomFormatUriReference.js +12 -0
- package/lib/internal/_randomFormatUriReference.js.map +1 -1
- package/lib/internal/_randomFormatUriReference.mjs +12 -0
- package/lib/internal/_randomFormatUriReference.mjs.map +1 -1
- package/lib/internal/_randomFormatUriTemplate.d.ts +12 -0
- package/lib/internal/_randomFormatUriTemplate.js +12 -0
- package/lib/internal/_randomFormatUriTemplate.js.map +1 -1
- package/lib/internal/_randomFormatUriTemplate.mjs +12 -0
- package/lib/internal/_randomFormatUriTemplate.mjs.map +1 -1
- package/lib/internal/_randomFormatUrl.d.ts +12 -0
- package/lib/internal/_randomFormatUrl.js +12 -0
- package/lib/internal/_randomFormatUrl.js.map +1 -1
- package/lib/internal/_randomFormatUrl.mjs +12 -0
- package/lib/internal/_randomFormatUrl.mjs.map +1 -1
- package/lib/internal/_randomFormatUuid.d.ts +13 -0
- package/lib/internal/_randomFormatUuid.js +13 -0
- package/lib/internal/_randomFormatUuid.js.map +1 -1
- package/lib/internal/_randomFormatUuid.mjs +13 -0
- package/lib/internal/_randomFormatUuid.mjs.map +1 -1
- package/lib/internal/_randomInteger.d.ts +17 -1
- package/lib/internal/_randomInteger.js +74 -23
- package/lib/internal/_randomInteger.js.map +1 -1
- package/lib/internal/_randomInteger.mjs +62 -23
- package/lib/internal/_randomInteger.mjs.map +1 -1
- package/lib/internal/_randomMultiple.d.ts +18 -1
- package/lib/internal/_randomMultiple.js +30 -13
- package/lib/internal/_randomMultiple.js.map +1 -1
- package/lib/internal/_randomMultiple.mjs +30 -13
- package/lib/internal/_randomMultiple.mjs.map +1 -1
- package/lib/internal/_randomNumber.d.ts +17 -1
- package/lib/internal/_randomNumber.js +67 -18
- package/lib/internal/_randomNumber.js.map +1 -1
- package/lib/internal/_randomNumber.mjs +59 -22
- package/lib/internal/_randomNumber.mjs.map +1 -1
- package/lib/internal/_randomPattern.d.ts +12 -0
- package/lib/internal/_randomPattern.js +12 -0
- package/lib/internal/_randomPattern.js.map +1 -1
- package/lib/internal/_randomPattern.mjs +12 -0
- package/lib/internal/_randomPattern.mjs.map +1 -1
- package/lib/internal/_randomPick.d.ts +13 -1
- package/lib/internal/_randomPick.js +15 -3
- package/lib/internal/_randomPick.js.map +1 -1
- package/lib/internal/_randomPick.mjs +15 -3
- package/lib/internal/_randomPick.mjs.map +1 -1
- package/lib/internal/_randomString.d.ts +15 -1
- package/lib/internal/_randomString.js +19 -5
- package/lib/internal/_randomString.js.map +1 -1
- package/lib/internal/_randomString.mjs +19 -5
- package/lib/internal/_randomString.mjs.map +1 -1
- package/lib/internal/_randomStringLength.d.ts +30 -1
- package/lib/internal/_randomStringLength.js +23 -1
- package/lib/internal/_randomStringLength.js.map +1 -1
- package/lib/internal/_randomStringLength.mjs +23 -1
- package/lib/internal/_randomStringLength.mjs.map +1 -1
- package/lib/internal/_stringLength.d.ts +11 -0
- package/lib/internal/_stringLength.js +11 -0
- package/lib/internal/_stringLength.js.map +1 -1
- package/lib/internal/_stringLength.mjs +11 -0
- package/lib/internal/_stringLength.mjs.map +1 -1
- package/lib/internal/_stringLengthGte.d.ts +11 -0
- package/lib/internal/_stringLengthGte.js +11 -0
- package/lib/internal/_stringLengthGte.js.map +1 -1
- package/lib/internal/_stringLengthGte.mjs +11 -0
- package/lib/internal/_stringLengthGte.mjs.map +1 -1
- package/lib/internal/_stringLengthLte.d.ts +11 -0
- package/lib/internal/_stringLengthLte.js +11 -0
- package/lib/internal/_stringLengthLte.js.map +1 -1
- package/lib/internal/_stringLengthLte.mjs +11 -0
- package/lib/internal/_stringLengthLte.mjs.map +1 -1
- package/lib/internal/_throwTypeGuardError.d.ts +9 -0
- package/lib/internal/_throwTypeGuardError.js +9 -0
- package/lib/internal/_throwTypeGuardError.js.map +1 -1
- package/lib/internal/_throwTypeGuardError.mjs +9 -0
- package/lib/internal/_throwTypeGuardError.mjs.map +1 -1
- package/lib/internal/_validateReport.d.ts +15 -0
- package/lib/internal/_validateReport.js +15 -0
- package/lib/internal/_validateReport.js.map +1 -1
- package/lib/internal/_validateReport.mjs +15 -0
- package/lib/internal/_validateReport.mjs.map +1 -1
- package/lib/internal/private/__notationRename.d.ts +5 -0
- package/lib/internal/private/__notationRename.js +5 -0
- package/lib/internal/private/__notationRename.js.map +1 -1
- package/lib/internal/private/__notationRename.mjs +5 -0
- package/lib/internal/private/__notationRename.mjs.map +1 -1
- package/lib/internal/private/__randomComposition.d.ts +27 -3
- package/lib/internal/private/__randomComposition.js +27 -3
- package/lib/internal/private/__randomComposition.js.map +1 -1
- package/lib/internal/private/__randomComposition.mjs +27 -3
- package/lib/internal/private/__randomComposition.mjs.map +1 -1
- package/lib/internal/private/__randomEpoch.d.ts +15 -0
- package/lib/internal/private/__randomEpoch.js +5 -0
- package/lib/internal/private/__randomEpoch.js.map +1 -1
- package/lib/internal/private/__randomEpoch.mjs +5 -0
- package/lib/internal/private/__randomEpoch.mjs.map +1 -1
- package/lib/json.d.ts +49 -14
- package/lib/json.js.map +1 -1
- package/lib/json.mjs.map +1 -1
- package/lib/llm.d.ts +41 -25
- package/lib/llm.js.map +1 -1
- package/lib/llm.mjs.map +1 -1
- package/lib/module.d.ts +1 -702
- package/lib/module.js +1 -101
- package/lib/module.js.map +1 -1
- package/lib/module.mjs +1 -81
- package/lib/module.mjs.map +1 -1
- package/lib/notations.d.ts +60 -0
- package/lib/notations.js.map +1 -1
- package/lib/notations.mjs.map +1 -1
- package/lib/plain.d.ts +38 -0
- package/lib/plain.js.map +1 -1
- package/lib/plain.mjs.map +1 -1
- package/lib/protobuf.d.ts +38 -4
- package/lib/protobuf.js.map +1 -1
- package/lib/protobuf.mjs.map +1 -1
- package/lib/reflect.d.ts +16 -12
- package/lib/reflect.js.map +1 -1
- package/lib/reflect.mjs.map +1 -1
- package/lib/transform.d.ts +17 -0
- package/lib/transform.js +17 -0
- package/lib/transform.js.map +1 -1
- package/lib/transform.mjs +17 -0
- package/lib/transform.mjs.map +1 -1
- package/native/adapter/adapter.go +28 -3
- package/native/adapter/adapter_options_branch_matrix_test.go +39 -34
- package/native/adapter/plugin_options.go +5 -0
- package/native/adapter/plugin_options_payload_matrix_test.go +5 -0
- package/native/cmd/ttsc-typia/any_array_type_tags_transform_test.go +38 -131
- package/native/cmd/ttsc-typia/assert_guard_factory_contract_test.go +31 -58
- package/native/cmd/ttsc-typia/atomic_intersection_schema_transform_test.go +28 -79
- package/native/cmd/ttsc-typia/bigint_literal_precision_transform_test.go +16 -82
- package/native/cmd/ttsc-typia/build_diagnostics_preserve_details_test.go +41 -0
- package/native/cmd/ttsc-typia/build_no_emit_preserves_analysis_options_test.go +9 -10
- package/native/cmd/ttsc-typia/build_no_emit_transform_diagnostics_test.go +9 -7
- package/native/cmd/ttsc-typia/build_plugin_options_come_from_payload_test.go +9 -11
- package/native/cmd/ttsc-typia/build_transactional_emit_success_test.go +9 -7
- package/native/cmd/ttsc-typia/build_transform_failure_atomicity_test.go +9 -7
- package/native/cmd/ttsc-typia/callable_interface_function_semantics_transform_test.go +9 -164
- package/native/cmd/ttsc-typia/callable_type_literal_boundaries_transform_test.go +20 -580
- package/native/cmd/ttsc-typia/compare_equal_cover_transform_test.go +10 -127
- package/native/cmd/ttsc-typia/compare_functional_union_membership_transform_test.go +93 -289
- package/native/cmd/ttsc-typia/compare_less_nan_transform_test.go +15 -66
- package/native/cmd/ttsc-typia/compare_nondiscriminable_union_transform_test.go +9 -221
- package/native/cmd/ttsc-typia/create_assert_error_factory_arity_test.go +11 -82
- package/native/cmd/ttsc-typia/default_library_spoof_native_identity_transform_test.go +10 -100
- package/native/cmd/ttsc-typia/demo_rejects_bad_flag_test.go +15 -14
- package/native/cmd/ttsc-typia/dependency_collector_virtual_scheme_test.go +8 -17
- package/native/cmd/ttsc-typia/dynamic_key_path_helper_alias_transform_test.go +10 -70
- package/native/cmd/ttsc-typia/dynamic_key_tags_transform_test.go +9 -120
- package/native/cmd/ttsc-typia/exact_optional_family_emission_contract_test.go +252 -0
- package/native/cmd/ttsc-typia/exclude_type_tag_transform_test.go +10 -102
- package/native/cmd/ttsc-typia/fixture_directories_test.go +154 -0
- package/native/cmd/ttsc-typia/functional_promised_type_transform_test.go +11 -104
- package/native/cmd/ttsc-typia/functional_receiver_transform_test.go +16 -124
- package/native/cmd/ttsc-typia/inline_type_display_name_transform_test.go +10 -183
- package/native/cmd/ttsc-typia/instance_union_create_is_transform_test.go +11 -88
- package/native/cmd/ttsc-typia/intersection_nonsensible_backstop_transform_test.go +17 -30
- package/native/cmd/ttsc-typia/intersection_union_validation_transform_test.go +10 -404
- package/native/cmd/ttsc-typia/json_application_alias_function_validation_transform_test.go +10 -22
- package/native/cmd/ttsc-typia/json_is_stringify_scoped_checker_transform_test.go +10 -111
- package/native/cmd/ttsc-typia/json_schema_dynamic_key_determinism_transform_test.go +25 -110
- package/native/cmd/ttsc-typia/json_schema_nonsensible_intersection_diagnostic_test.go +10 -22
- package/native/cmd/ttsc-typia/json_stringify_constant_atomic_union_transform_test.go +10 -101
- package/native/cmd/ttsc-typia/lib_replacement_native_identity_transform_test.go +11 -98
- package/native/cmd/ttsc-typia/llm_evaluation_accepts_property_probability_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_accepts_unselected_source_probability_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_complete_object_shape_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_emits_configured_decimals_test.go +53 -0
- package/native/cmd/ttsc-typia/llm_evaluation_ignores_declaration_probability_without_call_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_plan_emission_transform_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_program_scan_dependencies_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_alias_comment_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_alias_refinement_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_computed_method_probability_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_conflicting_boolean_tags_test.go +52 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_finer_than_probability_decimals_test.go +100 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_imported_declaration_probability_test.go +6 -1
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_invalid_config_test.go +51 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_invalid_probability_test.go +14 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_oversized_questions_test.go +79 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_refinements_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_shared_values_test.go +128 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_undecidable_types_test.go +6 -12
- package/native/cmd/ttsc-typia/local_function_named_like_typia_operation_transform_test.go +9 -17
- package/native/cmd/ttsc-typia/metadata_type_tag_sole_malformed_diagnostic_test.go +10 -28
- package/native/cmd/ttsc-typia/native_collection_identity_is_transform_test.go +9 -129
- package/native/cmd/ttsc-typia/native_generic_name_guard_is_transform_test.go +10 -95
- package/native/cmd/ttsc-typia/native_name_collision_is_transform_test.go +9 -122
- package/native/cmd/ttsc-typia/native_named_intersection_union_transform_test.go +10 -135
- package/native/cmd/ttsc-typia/node_buffer_native_exports_is_transform_test.go +18 -234
- package/native/cmd/ttsc-typia/non_trailing_rest_tuple_transform_test.go +19 -71
- package/native/cmd/ttsc-typia/notation_kebab_case_transform_test.go +10 -109
- package/native/cmd/ttsc-typia/notation_pascal_case_transform_test.go +10 -142
- package/native/cmd/ttsc-typia/notation_unicode_key_transform_test.go +9 -201
- package/native/cmd/ttsc-typia/nullable_primitive_property_is_transform_test.go +10 -102
- package/native/cmd/ttsc-typia/object_custom_tag_validation_transform_test.go +10 -112
- package/native/cmd/ttsc-typia/object_union_explicit_pointer_schema_transform_test.go +68 -114
- package/native/cmd/ttsc-typia/package_declaration_native_identity_is_transform_test.go +10 -114
- package/native/cmd/ttsc-typia/pattern_line_terminator_escape_transform_test.go +45 -123
- package/native/cmd/ttsc-typia/plain_classify_class_ref_transform_test.go +12 -97
- package/native/cmd/ttsc-typia/plain_classify_container_seed_transform_test.go +12 -74
- package/native/cmd/ttsc-typia/plain_classify_cross_module_extra_transform_test.go +15 -91
- package/native/cmd/ttsc-typia/plain_classify_cross_module_transform_test.go +40 -0
- package/native/cmd/ttsc-typia/plain_classify_deep_nested_transform_test.go +12 -103
- package/native/cmd/ttsc-typia/plain_classify_field_copy_transform_test.go +10 -120
- package/native/cmd/ttsc-typia/plain_classify_from_new_transform_test.go +12 -255
- package/native/cmd/ttsc-typia/plain_classify_generic_private_rejected_test.go +30 -0
- package/native/cmd/ttsc-typia/plain_classify_inherited_private_rejected_test.go +33 -0
- package/native/cmd/ttsc-typia/plain_classify_named_interface_field_copy_test.go +33 -0
- package/native/cmd/ttsc-typia/plain_classify_private_field_rejected_test.go +36 -0
- package/native/cmd/ttsc-typia/plain_classify_recursive_anonymous_object_test.go +30 -0
- package/native/cmd/ttsc-typia/plain_classify_self_ref_private_rejected_test.go +33 -0
- package/native/cmd/ttsc-typia/plain_classify_static_private_allowed_test.go +35 -0
- package/native/cmd/ttsc-typia/plain_classify_strategy_edges_transform_test.go +16 -291
- package/native/cmd/ttsc-typia/plain_classify_unbound_anonymous_class_test.go +35 -0
- package/native/cmd/ttsc-typia/plain_classify_union_transform_test.go +12 -73
- package/native/cmd/ttsc-typia/plain_classify_validated_union_transform_test.go +11 -146
- package/native/cmd/ttsc-typia/plain_clone_bigint_wrapper_transform_test.go +10 -80
- package/native/cmd/ttsc-typia/private_field_filter_is_transform_test.go +10 -137
- package/native/cmd/ttsc-typia/project_catalog_transform_coverage_test.go +4 -0
- package/native/cmd/ttsc-typia/project_dependencies_barrel_reexport_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_callee_argument_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_callee_barrel_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_callee_inference_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_callee_shape_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_callee_untransformed_barrel_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_collapsed_alias_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_complete_diagnostic_transform_test.go +7 -11
- package/native/cmd/ttsc-typia/project_dependencies_complete_envelope_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_complete_inferred_type_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_complete_replaced_library_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_complete_untouched_reprint_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_computed_key_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_custom_lib_name_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_default_barrel_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_empty_heritage_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_enum_member_value_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_envelope_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_index_signature_alias_transform_test.go +9 -12
- package/native/cmd/ttsc-typia/project_dependencies_inferred_declaration_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_jsdoc_typedef_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_local_reexport_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_named_tuple_member_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_qualified_barrel_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_signature_alias_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_star_barrel_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_type_parameter_default_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_reference_graph_envelope_transform_test.go +10 -32
- package/native/cmd/ttsc-typia/protobuf_diagnostic_code_transform_test.go +9 -31
- package/native/cmd/ttsc-typia/protobuf_is_encode_finite_number_transform_test.go +10 -23
- package/native/cmd/ttsc-typia/protobuf_object_generic_union_encode_transform_test.go +12 -114
- package/native/cmd/ttsc-typia/protobuf_sequence_field_numbers_transform_test.go +9 -26
- package/native/cmd/ttsc-typia/random_recursive_min_items_diagnostic_test.go +26 -22
- package/native/cmd/ttsc-typia/random_unsatisfiable_recursive_diagnostic_test.go +10 -26
- package/native/cmd/ttsc-typia/recursive_conditional_alias_name_transform_test.go +10 -185
- package/native/cmd/ttsc-typia/recursive_visit_tracking_transform_test.go +10 -291
- package/native/cmd/ttsc-typia/reflect_literals_non_literal_rejection_transform_test.go +9 -28
- package/native/cmd/ttsc-typia/schema_dts_role_transform_test.go +11 -206
- package/native/cmd/ttsc-typia/schema_literal_helpers_test.go +110 -0
- package/native/cmd/ttsc-typia/shadowed_typia_module_declaration_diagnostic_test.go +9 -17
- package/native/cmd/ttsc-typia/shallow_depth_argument_error_transform_test.go +10 -24
- package/native/cmd/ttsc-typia/shallow_depth_limit_transform_test.go +10 -105
- package/native/cmd/ttsc-typia/shallow_nested_depth_transform_test.go +10 -24
- package/native/cmd/ttsc-typia/symbol_key_member_filter_transform_test.go +10 -147
- package/native/cmd/ttsc-typia/template_interpolation_type_tags_transform_test.go +10 -272
- package/native/cmd/ttsc-typia/template_literal_type_tags_transform_test.go +10 -92
- package/native/cmd/ttsc-typia/transform_diagnostics_preserve_details_test.go +9 -86
- package/native/cmd/ttsc-typia/transform_fixtures_emit_coverage_test.go +48 -29
- package/native/cmd/ttsc-typia/transform_helpers_test.go +41 -360
- package/native/cmd/ttsc-typia/transform_plugin_options_come_from_payload_test.go +9 -12
- package/native/cmd/ttsc-typia/transform_project_diagnostics_preserve_details_test.go +54 -0
- package/native/cmd/ttsc-typia/transform_single_file_failure_atomicity_test.go +9 -11
- package/native/cmd/ttsc-typia/transform_single_file_failure_writes_no_stdout_test.go +9 -8
- package/native/cmd/ttsc-typia/transform_single_file_js_distinguishes_same_basename_sources_test.go +9 -14
- package/native/cmd/ttsc-typia/transform_single_file_js_locates_output_across_layouts_test.go +9 -16
- package/native/cmd/ttsc-typia/transform_single_file_success_publishes_artifact_test.go +9 -9
- package/native/cmd/ttsc-typia/transform_wasm_host_argv_reports_diagnostics_test.go +9 -10
- package/native/cmd/ttsc-typia/tuple_optional_compare_clone_transform_test.go +33 -181
- package/native/cmd/ttsc-typia/typia_diagnostic_formatting_test.go +46 -0
- package/native/cmd/ttsc-typia/uri_template_comment_dotted_variable_transform_test.go +57 -0
- package/native/cmd/ttsc-typia/user_global_native_identity_transform_test.go +16 -202
- package/native/cmd/ttsc-typia/wrong_type_tag_target_diagnostic_test.go +12 -12
- package/native/core/context/EmitFactory.go +10 -0
- package/native/core/context/IProgrammerProps.go +21 -4
- package/native/core/context/ITransformOptions.go +22 -4
- package/native/core/context/ITypiaContext.go +61 -11
- package/native/core/context/ImportProgrammer.go +144 -6
- package/native/core/context/TransformerError.go +74 -7
- package/native/core/context/import_programmer_default_type_only_needs_every_request_test.go +58 -0
- package/native/core/context/import_programmer_module_identifier_test.go +5 -0
- package/native/core/context/import_programmer_statement_coverage_test.go +106 -50
- package/native/core/context/transformer_error_formatting_test.go +82 -77
- package/native/core/factories/CommentFactory.go +8 -0
- package/native/core/factories/ExpressionFactory.go +121 -5
- package/native/core/factories/FormatCheatSheet.go +1 -1
- package/native/core/factories/JsonMetadataFactory.go +29 -4
- package/native/core/factories/LiteralFactory.go +24 -1
- package/native/core/factories/MetadataCommentTagFactory.go +177 -29
- package/native/core/factories/MetadataFactory.go +59 -5
- package/native/core/factories/ProtobufFactory.go +17 -4
- package/native/core/factories/StatementFactory.go +38 -5
- package/native/core/factories/TemplateFactory.go +10 -0
- package/native/core/factories/TypeFactory.go +33 -5
- package/native/core/factories/expression_factory_number_spells_non_finite_values_test.go +74 -0
- package/native/core/factories/factory_utility_coverage_test.go +8 -3
- package/native/core/factories/format_alias_resolves_to_cheat_sheet_test.go +5 -0
- package/native/core/factories/format_alias_table_targets_the_cheat_sheet_test.go +20 -30
- package/native/core/factories/identifier_factory_postfix_escapes_every_key_test.go +5 -0
- package/native/core/factories/identifier_factory_postfix_survives_every_code_point_test.go +5 -0
- package/native/core/factories/internal/metadata/IMetadataIteratorProps.go +115 -22
- package/native/core/factories/internal/metadata/MetadataHelper.go +64 -1
- package/native/core/factories/internal/metadata/comment_tags_coverage_test.go +167 -148
- package/native/core/factories/internal/metadata/emend_metadata_atomics.go +28 -1
- package/native/core/factories/internal/metadata/emplace_metadata_alias.go +10 -3
- package/native/core/factories/internal/metadata/emplace_metadata_array_type.go +17 -0
- package/native/core/factories/internal/metadata/emplace_metadata_object.go +12 -1
- package/native/core/factories/internal/metadata/emplace_metadata_tuple.go +10 -0
- package/native/core/factories/internal/metadata/explore_metadata.go +48 -9
- package/native/core/factories/internal/metadata/iterate_metadata.go +12 -0
- package/native/core/factories/internal/metadata/iterate_metadata_alias.go +8 -0
- package/native/core/factories/internal/metadata/iterate_metadata_array.go +7 -0
- package/native/core/factories/internal/metadata/iterate_metadata_atomic.go +7 -0
- package/native/core/factories/internal/metadata/iterate_metadata_coalesce.go +8 -0
- package/native/core/factories/internal/metadata/iterate_metadata_collection.go +8 -0
- package/native/core/factories/internal/metadata/iterate_metadata_collection_branch_matrix_test.go +148 -143
- package/native/core/factories/internal/metadata/iterate_metadata_comment_tags.go +7 -0
- package/native/core/factories/internal/metadata/iterate_metadata_constant.go +68 -0
- package/native/core/factories/internal/metadata/iterate_metadata_escape.go +7 -0
- package/native/core/factories/internal/metadata/iterate_metadata_function.go +33 -10
- package/native/core/factories/internal/metadata/iterate_metadata_intersection.go +22 -11
- package/native/core/factories/internal/metadata/iterate_metadata_intersection_brand_coverage_test.go +5 -0
- package/native/core/factories/internal/metadata/iterate_metadata_intersection_coverage_test.go +88 -83
- package/native/core/factories/internal/metadata/iterate_metadata_intersection_shareable_name_test.go +4 -0
- package/native/core/factories/internal/metadata/iterate_metadata_map.go +7 -0
- package/native/core/factories/internal/metadata/iterate_metadata_native.go +11 -1
- package/native/core/factories/internal/metadata/iterate_metadata_object.go +8 -0
- package/native/core/factories/internal/metadata/iterate_metadata_set.go +7 -0
- package/native/core/factories/internal/metadata/iterate_metadata_sort.go +11 -0
- package/native/core/factories/internal/metadata/iterate_metadata_template.go +7 -0
- package/native/core/factories/internal/metadata/iterate_metadata_tuple.go +7 -0
- package/native/core/factories/internal/metadata/iterate_metadata_union.go +10 -0
- package/native/core/factories/internal/metadata/js_doc_link_text_test.go +5 -0
- package/native/core/factories/internal/metadata/js_doc_parameter_name_reads_qualified_name_test.go +31 -26
- package/native/core/factories/internal/metadata/js_doc_type_tag_blank_separation_test.go +88 -0
- package/native/core/factories/internal/metadata/sort_constants_coverage_test.go +50 -39
- package/native/core/factories/internal/metadata/type_arguments_precondition_test.go +5 -0
- package/native/core/factories/json_metadata_factory_dedupes_bigint_diagnostics_test.go +5 -0
- package/native/core/factories/json_metadata_factory_rejects_bigint_native_test.go +5 -0
- package/native/core/factories/literal_factory_null_survives_objects_test.go +5 -0
- package/native/core/factories/literal_factory_ordered_object_marshals_json_test.go +5 -0
- package/native/core/factories/metadata_comment_tag_factory_coverage_test.go +5 -0
- package/native/core/factories/metadata_comment_tag_factory_exclusivity_matches_interface_test.go +10 -5
- package/native/core/factories/metadata_comment_tag_factory_holds_bigint_tags_exact_test.go +173 -0
- package/native/core/factories/metadata_comment_tag_factory_reads_javascript_numbers_test.go +163 -0
- package/native/core/factories/metadata_comment_tag_factory_rejects_out_of_range_integer_test.go +7 -2
- package/native/core/factories/metadata_comment_tag_factory_string_length_helpers_test.go +5 -0
- package/native/core/factories/metadata_type_tag_factory_accepts_legal_tag_combinations_test.go +6 -1
- package/native/core/factories/metadata_type_tag_factory_keeps_bool_form_exclusivity_test.go +5 -0
- package/native/core/factories/metadata_type_tag_factory_rejects_cross_kind_exclusive_tags_test.go +5 -0
- package/native/core/factories/metadata_type_tag_factory_rejects_duplicated_array_form_tags_test.go +5 -0
- package/native/core/factories/metadata_type_tag_factory_reports_all_invalid_candidates_test.go +5 -0
- package/native/core/factories/numeric_range_factory_enforces_64bit_bounds_test.go +58 -2
- package/native/core/factories/protobuf_factory_bigint_keeps_each_width_test.go +47 -0
- package/native/core/factories/protobuf_factory_rejects_invalid_field_names_test.go +5 -0
- package/native/core/factories/protobuf_recovery_ownership_test.go +5 -0
- package/native/core/programmers/AssertProgrammer.go +27 -0
- package/native/core/programmers/IsProgrammer.go +67 -1
- package/native/core/programmers/RandomProgrammer.go +39 -22
- package/native/core/programmers/ValidateProgrammer.go +28 -1
- package/native/core/programmers/compare/CompareEqualProgrammer.go +26 -3
- package/native/core/programmers/compare/CompareLessProgrammer.go +17 -3
- package/native/core/programmers/functional/FunctionalAssertFunctionProgrammer.go +47 -6
- package/native/core/programmers/functional/FunctionalAssertParametersProgrammer.go +70 -13
- package/native/core/programmers/functional/FunctionalAssertReturnProgrammer.go +76 -12
- package/native/core/programmers/functional/FunctionalIsFunctionProgrammer.go +31 -5
- package/native/core/programmers/functional/FunctionalIsParametersProgrammer.go +169 -18
- package/native/core/programmers/functional/FunctionalIsReturnProgrammer.go +67 -11
- package/native/core/programmers/functional/FunctionalValidateFunctionProgrammer.go +31 -5
- package/native/core/programmers/functional/FunctionalValidateParametersProgrammer.go +63 -12
- package/native/core/programmers/functional/FunctionalValidateReturnProgrammer.go +68 -11
- package/native/core/programmers/functional/internal/FunctionalGeneralProgrammer.go +22 -2
- package/native/core/programmers/helpers/ClassifyJoiner.go +14 -6
- package/native/core/programmers/helpers/CloneJoiner.go +29 -0
- package/native/core/programmers/helpers/FunctionProgrammer.go +98 -0
- package/native/core/programmers/helpers/ICheckEntry.go +16 -0
- package/native/core/programmers/helpers/IExpressionEntry.go +8 -0
- package/native/core/programmers/helpers/ModuloText.go +5 -0
- package/native/core/programmers/helpers/NotationJoiner.go +23 -0
- package/native/core/programmers/helpers/ProtobufWire.go +8 -0
- package/native/core/programmers/helpers/PruneJoiner.go +21 -0
- package/native/core/programmers/helpers/RandomJoiner.go +52 -5
- package/native/core/programmers/helpers/StringifyJoinder.go +31 -12
- package/native/core/programmers/helpers/UnionExplorer.go +202 -70
- package/native/core/programmers/helpers/UnionPredicator.go +9 -0
- package/native/core/programmers/helpers/clone_joiner_optional_condition_test.go +14 -1
- package/native/core/programmers/helpers/function_programmer_unique_names_test.go +5 -0
- package/native/core/programmers/helpers/joiner_branch_coverage_test.go +5 -0
- package/native/core/programmers/helpers/option_predicator_contract_matrix_test.go +84 -0
- package/native/core/programmers/helpers/random_joiner_recursive_array_guard_test.go +5 -0
- package/native/core/programmers/helpers/union_explorer_coverage_test.go +120 -112
- package/native/core/programmers/helpers/union_predicator_checks_neighbor_flag_test.go +5 -0
- package/native/core/programmers/helpers/union_predicator_skips_atomic_like_native_fields_test.go +5 -0
- package/native/core/programmers/helpers/union_predicator_skips_collection_bucket_fields_test.go +5 -0
- package/native/core/programmers/helpers/union_predicator_skips_shared_native_names_test.go +5 -0
- package/native/core/programmers/helpers/union_predicator_skips_shared_object_fields_test.go +5 -0
- package/native/core/programmers/helpers/union_predicator_skips_shared_template_fields_test.go +5 -0
- package/native/core/programmers/http/HttpAssertFormDataProgrammer.go +9 -0
- package/native/core/programmers/http/HttpAssertHeadersProgrammer.go +9 -0
- package/native/core/programmers/http/HttpAssertQueryProgrammer.go +20 -0
- package/native/core/programmers/http/HttpFormDataProgrammer.go +48 -2
- package/native/core/programmers/http/HttpHeadersProgrammer.go +63 -4
- package/native/core/programmers/http/HttpIsFormDataProgrammer.go +8 -0
- package/native/core/programmers/http/HttpIsHeadersProgrammer.go +8 -0
- package/native/core/programmers/http/HttpIsQueryProgrammer.go +19 -1
- package/native/core/programmers/http/HttpParameterProgrammer.go +1 -3
- package/native/core/programmers/http/HttpQueryProgrammer.go +44 -44
- package/native/core/programmers/http/HttpValidateFormDataProgrammer.go +8 -0
- package/native/core/programmers/http/HttpValidateHeadersProgrammer.go +8 -0
- package/native/core/programmers/http/HttpValidateQueryProgrammer.go +18 -1
- package/native/core/programmers/http/http_programmer_helper_coverage_test.go +98 -93
- package/native/core/programmers/internal/CheckerProgrammer.go +162 -18
- package/native/core/programmers/internal/FeatureProgrammer.go +254 -38
- package/native/core/programmers/internal/feature_programmer_visit_guard_test.go +82 -55
- package/native/core/programmers/internal/internal_utility_coverage_test.go +338 -345
- package/native/core/programmers/iterate/check_array_length.go +15 -0
- package/native/core/programmers/iterate/check_bigint.go +14 -0
- package/native/core/programmers/iterate/check_dynamic_key.go +33 -19
- package/native/core/programmers/iterate/check_dynamic_key_tag_rows_test.go +59 -32
- package/native/core/programmers/iterate/check_dynamic_properties.go +70 -16
- package/native/core/programmers/iterate/check_everything.go +7 -0
- package/native/core/programmers/iterate/check_native.go +14 -0
- package/native/core/programmers/iterate/check_number.go +16 -0
- package/native/core/programmers/iterate/check_number_option_contract_matrix_test.go +84 -0
- package/native/core/programmers/iterate/check_object.go +28 -0
- package/native/core/programmers/iterate/check_object_strict_optional_undefined_test.go +6 -1
- package/native/core/programmers/iterate/check_object_type_tags.go +15 -0
- package/native/core/programmers/iterate/check_string.go +14 -0
- package/native/core/programmers/iterate/check_template.go +15 -0
- package/native/core/programmers/iterate/decode_union_object.go +35 -2
- package/native/core/programmers/iterate/exact_optional_checker_entry_contract_test.go +142 -0
- package/native/core/programmers/iterate/exact_optional_graph_clone_random_contract_test.go +213 -0
- package/native/core/programmers/iterate/feature_object_entries.go +40 -0
- package/native/core/programmers/iterate/iterate_utility_coverage_test.go +30 -5
- package/native/core/programmers/iterate/json_schema_array.go +16 -0
- package/native/core/programmers/iterate/json_schema_bigint.go +7 -0
- package/native/core/programmers/iterate/json_schema_boolean.go +7 -0
- package/native/core/programmers/iterate/json_schema_discriminator_declaration_syntax_test.go +10 -5
- package/native/core/programmers/iterate/json_schema_jsDocTags.go +10 -3
- package/native/core/programmers/iterate/json_schema_jsdoc_tags_cast_reads_javascript_numbers_test.go +69 -0
- package/native/core/programmers/iterate/json_schema_native.go +27 -0
- package/native/core/programmers/iterate/json_schema_number.go +7 -0
- package/native/core/programmers/iterate/json_schema_pattern_property_order_test.go +5 -0
- package/native/core/programmers/iterate/json_schema_plugin.go +7 -0
- package/native/core/programmers/iterate/json_schema_station.go +16 -0
- package/native/core/programmers/iterate/json_schema_string.go +7 -0
- package/native/core/programmers/iterate/openapi_v3_downgrader.go +29 -10
- package/native/core/programmers/iterate/openapi_v3_downgrader_boolean_default_test.go +9 -4
- package/native/core/programmers/iterate/openapi_v3_downgrader_test.go +9 -4
- package/native/core/programmers/iterate/postfix_of_tuple.go +8 -0
- package/native/core/programmers/iterate/template_interpolation_tags_test.go +46 -4
- package/native/core/programmers/iterate/template_runtime_pattern.go +10 -4
- package/native/core/programmers/iterate/wrap_metadata_rest_tuple.go +8 -0
- package/native/core/programmers/json/JsonApplicationProgrammer.go +9 -0
- package/native/core/programmers/json/JsonAssertParseProgrammer.go +9 -0
- package/native/core/programmers/json/JsonAssertStringifyProgrammer.go +9 -0
- package/native/core/programmers/json/JsonIsParseProgrammer.go +7 -0
- package/native/core/programmers/json/JsonIsStringifyProgrammer.go +8 -0
- package/native/core/programmers/json/JsonSchemaProgrammer.go +15 -0
- package/native/core/programmers/json/JsonSchemasProgrammer.go +16 -0
- package/native/core/programmers/json/JsonStringifyProgrammer.go +20 -32
- package/native/core/programmers/json/JsonValidateParseProgrammer.go +8 -0
- package/native/core/programmers/json/JsonValidateStringifyProgrammer.go +8 -0
- package/native/core/programmers/json/json_schema_programmer_coverage_test.go +176 -171
- package/native/core/programmers/json/json_schemas_programmer_dedupes_bigint_diagnostics_test.go +5 -0
- package/native/core/programmers/json/json_schemas_programmer_rejects_bigint_native_test.go +5 -0
- package/native/core/programmers/json/json_stringify_programmer_coverage_test.go +400 -398
- package/native/core/programmers/llm/LlmApplicationProgrammer.go +10 -9
- package/native/core/programmers/llm/LlmCoerceProgrammer.go +16 -9
- package/native/core/programmers/llm/LlmControllerProgrammer.go +10 -0
- package/native/core/programmers/llm/LlmEvaluationProgrammer.go +107 -11
- package/native/core/programmers/llm/LlmParametersProgrammer.go +8 -9
- package/native/core/programmers/llm/LlmParseProgrammer.go +24 -9
- package/native/core/programmers/llm/LlmSchemaProgrammer.go +50 -13
- package/native/core/programmers/llm/LlmStructuredOutputProgrammer.go +8 -9
- package/native/core/programmers/llm/llm_application_programmer_coverage_test.go +146 -141
- package/native/core/programmers/llm/llm_reference_codec_test.go +5 -0
- package/native/core/programmers/llm/llm_reference_description_test.go +13 -3
- package/native/core/programmers/llm/llm_schema_programmer_coverage_test.go +255 -250
- package/native/core/programmers/llm/llm_schema_programmer_dedupes_bigint_diagnostics_test.go +5 -0
- package/native/core/programmers/llm/llm_schema_programmer_rejects_bigint_native_test.go +5 -0
- package/native/core/programmers/llm/llm_schema_programmer_rejects_exclude_tag_in_strict_test.go +7 -3
- package/native/core/programmers/notations/NotationAssertGeneralProgrammer.go +32 -4
- package/native/core/programmers/notations/NotationGeneralProgrammer.go +70 -42
- package/native/core/programmers/notations/NotationIsGeneralProgrammer.go +29 -3
- package/native/core/programmers/notations/NotationValidateGeneralProgrammer.go +32 -4
- package/native/core/programmers/notations/notation_general_helpers_test.go +363 -367
- package/native/core/programmers/notations/notation_general_programmer_pascal_multiword_test.go +5 -0
- package/native/core/programmers/notations/notation_general_programmer_snake_prefix_test.go +5 -0
- package/native/core/programmers/notations/notation_general_programmer_underscore_boundary_test.go +5 -0
- package/native/core/programmers/plain/PlainAssertClassifyProgrammer.go +23 -3
- package/native/core/programmers/plain/PlainAssertCloneProgrammer.go +22 -3
- package/native/core/programmers/plain/PlainAssertPruneProgrammer.go +22 -3
- package/native/core/programmers/plain/PlainClassifyProgrammer.go +61 -85
- package/native/core/programmers/plain/PlainCloneProgrammer.go +34 -38
- package/native/core/programmers/plain/PlainIsCloneProgrammer.go +18 -2
- package/native/core/programmers/plain/PlainIsPruneProgrammer.go +18 -2
- package/native/core/programmers/plain/PlainPruneProgrammer.go +29 -10
- package/native/core/programmers/plain/PlainValidateClassifyProgrammer.go +22 -3
- package/native/core/programmers/plain/PlainValidateCloneProgrammer.go +22 -3
- package/native/core/programmers/plain/PlainValidatePruneProgrammer.go +22 -3
- package/native/core/programmers/plain/plain_programmer_helper_coverage_test.go +6 -3
- package/native/core/programmers/plain/plain_prune_programmer_branch_matrix_test.go +5 -0
- package/native/core/programmers/plain/plain_tuple_seed_recovery_ownership_test.go +5 -0
- package/native/core/programmers/protobuf/ProtobufAssertDecodeProgrammer.go +19 -0
- package/native/core/programmers/protobuf/ProtobufAssertEncodeProgrammer.go +19 -0
- package/native/core/programmers/protobuf/ProtobufDecodeProgrammer.go +19 -1
- package/native/core/programmers/protobuf/ProtobufEncodeProgrammer.go +30 -30
- package/native/core/programmers/protobuf/ProtobufIsDecodeProgrammer.go +19 -1
- package/native/core/programmers/protobuf/ProtobufIsEncodeProgrammer.go +19 -1
- package/native/core/programmers/protobuf/ProtobufMessageProgrammer.go +11 -5
- package/native/core/programmers/protobuf/ProtobufValidateDecodeProgrammer.go +19 -1
- package/native/core/programmers/protobuf/ProtobufValidateEncodeProgrammer.go +19 -1
- package/native/core/programmers/protobuf/protobuf_programmer_helper_coverage_test.go +493 -453
- package/native/core/programmers/random_programmer_helper_coverage_test.go +350 -342
- package/native/core/programmers/random_programmer_length_argument_test.go +32 -1
- package/native/core/programmers/random_programmer_min_items_tag_test.go +5 -0
- package/native/core/programmers/random_programmer_pick_hook_test.go +88 -0
- package/native/core/programmers/reflect/ReflectLiteralsProgrammer.go +15 -0
- package/native/core/schemas/metadata/IMetadataTypeTagSequence.go +12 -1
- package/native/core/schemas/metadata/MetadataAlias.go +41 -1
- package/native/core/schemas/metadata/MetadataAliasType.go +57 -21
- package/native/core/schemas/metadata/MetadataArray.go +37 -1
- package/native/core/schemas/metadata/MetadataArrayType.go +52 -18
- package/native/core/schemas/metadata/MetadataAtomic.go +44 -10
- package/native/core/schemas/metadata/MetadataBigint.go +20 -4
- package/native/core/schemas/metadata/MetadataCollection.go +264 -53
- package/native/core/schemas/metadata/MetadataComponents.go +13 -116
- package/native/core/schemas/metadata/MetadataConstant.go +35 -13
- package/native/core/schemas/metadata/MetadataConstantValue.go +87 -20
- package/native/core/schemas/metadata/MetadataDefaultLibrary.go +20 -0
- package/native/core/schemas/metadata/MetadataDependency.go +52 -2
- package/native/core/schemas/metadata/MetadataEscaped.go +48 -8
- package/native/core/schemas/metadata/MetadataFunction.go +42 -16
- package/native/core/schemas/metadata/MetadataMap.go +53 -4
- package/native/core/schemas/metadata/MetadataNative.go +65 -9
- package/native/core/schemas/metadata/MetadataObject.go +37 -1
- package/native/core/schemas/metadata/MetadataObjectType.go +117 -74
- package/native/core/schemas/metadata/MetadataParameter.go +51 -16
- package/native/core/schemas/metadata/MetadataProperty.go +49 -19
- package/native/core/schemas/metadata/MetadataSchema.go +324 -198
- package/native/core/schemas/metadata/MetadataSet.go +49 -2
- package/native/core/schemas/metadata/MetadataTemplate.go +61 -15
- package/native/core/schemas/metadata/MetadataTuple.go +21 -0
- package/native/core/schemas/metadata/MetadataTupleType.go +61 -19
- package/native/core/schemas/metadata/metadata_atomic_tags_are_owned_test.go +75 -0
- package/native/core/schemas/metadata/metadata_bigint_is_comparable_test.go +5 -0
- package/native/core/schemas/metadata/metadata_collection_generic_argument_dot_test.go +13 -8
- package/native/core/schemas/metadata/metadata_collection_name_allocation_test.go +9 -2
- package/native/core/schemas/metadata/metadata_collection_openapi_name_cascade_test.go +5 -0
- package/native/core/schemas/metadata/metadata_collection_openapi_name_test.go +7 -1
- package/native/core/schemas/metadata/metadata_object_coverage_compares_property_values_test.go +61 -0
- package/native/core/schemas/metadata/metadata_object_type_required_literal_property_test.go +7 -1
- package/native/core/schemas/metadata/metadata_schema_covers_tag_matrix_test.go +8 -3
- package/native/core/schemas/metadata/metadata_schema_merge_keeps_inputs_test.go +117 -0
- package/native/core/schemas/metadata/metadata_schema_optional_root_isolation_test.go +59 -0
- package/native/core/schemas/metadata/metadata_schema_shallow_clone_names_test.go +36 -0
- package/native/core/schemas/metadata/metadata_schema_sole_literal_caches_pointer_test.go +5 -0
- package/native/core/schemas/metadata/schema_sequence_and_json_coverage_test.go +289 -387
- package/native/core/schemas/protobuf/IProtobufProperty.go +11 -0
- package/native/core/schemas/protobuf/IProtobufPropertyType.go +94 -0
- package/native/core/schemas/protobuf/IProtobufSchema.go +89 -5
- package/native/core/utils/NumberUtil.go +201 -0
- package/native/core/utils/PromiseTypeFactory.go +12 -1
- package/native/core/utils/number_util_rational_keeps_written_value_test.go +67 -0
- package/native/core/utils/number_util_reads_javascript_number_grammar_test.go +152 -0
- package/native/core/utils/promise_type_factory_semantics_test.go +5 -0
- package/native/transform/CallExpressionTransformer.go +42 -10
- package/native/transform/FileTransformer.go +72 -53
- package/native/transform/ITransformProps.go +7 -0
- package/native/transform/NodeTransformer.go +10 -1
- package/native/transform/TransformerError.go +31 -0
- package/native/transform/call_expression_transformer_registry_coverage_test.go +40 -31
- package/native/transform/call_expression_transformer_target_test.go +33 -4
- package/native/transform/features/CreateIsTransformer.go +0 -1
- package/native/transform/features/CreateShallowTransformer.go +0 -1
- package/native/transform/features/CreateValidateTransformer.go +0 -1
- package/native/transform/features/IsTransformer.go +0 -1
- package/native/transform/features/ShallowTransformer.go +0 -1
- package/native/transform/features/ValidateTransformer.go +0 -1
- package/native/transform/features/functional/FunctionalGenericTransformer.go +46 -7
- package/native/transform/features/http/CreateHttpIsQueryTransformer.go +0 -1
- package/native/transform/features/http/CreateHttpQueryTransformer.go +0 -1
- package/native/transform/features/http/CreateHttpValidateQueryTransformer.go +0 -1
- package/native/transform/features/http/HttpIsQueryTransformer.go +0 -1
- package/native/transform/features/http/HttpQueryTransformer.go +0 -1
- package/native/transform/features/http/HttpValidateQueryTransformer.go +0 -1
- package/native/transform/features/llm/LlmEvaluationProbabilityDeclarations_test.go +6 -1
- package/native/transform/features/llm/LlmEvaluationTransformer.go +55 -1
- package/native/transform/features/notations/notation_transformer_capitalize_test.go +29 -0
- package/native/transform/features/protobuf/ProtobufCreateDecodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufCreateEncodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufCreateIsDecodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufCreateIsEncodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufCreateValidateDecodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufCreateValidateEncodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufDecodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufEncodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufIsDecodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufIsEncodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufValidateDecodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufValidateEncodeTransformer.go +1 -1
- package/native/transform/features/reflect/reflect_metadata_transformer_edge_branches_test.go +42 -30
- package/native/transform/file_transformer_coverage_test.go +17 -3
- package/native/transform/internal/GenericTransformer.go +67 -113
- package/native/transform/transform.go +16 -2
- package/package.json +7 -6
- package/src/TypeGuardError.ts +20 -4
- package/src/basic.ts +1020 -0
- package/src/compare.ts +21 -0
- package/src/functional.ts +42 -0
- package/src/http.ts +136 -34
- package/src/internal/_IProtobufWriter.ts +115 -0
- package/src/internal/_ProtobufReader.ts +159 -1
- package/src/internal/_ProtobufSizer.ts +137 -5
- package/src/internal/_ProtobufWriter.ts +154 -1
- package/src/internal/_accessExpressionAsString.ts +11 -0
- package/src/internal/_assertGuard.ts +12 -0
- package/src/internal/_coerceLlmArguments.ts +10 -0
- package/src/internal/_createLlmEvaluation.ts +10 -53
- package/src/internal/_createStandardSchema.ts +13 -0
- package/src/internal/_decimal.ts +77 -0
- package/src/internal/_functionalTypeGuardErrorFactory.ts +8 -0
- package/src/internal/_httpFormDataReadArray.ts +9 -0
- package/src/internal/_httpFormDataReadBigint.ts +15 -1
- package/src/internal/_httpFormDataReadBlob.ts +11 -0
- package/src/internal/_httpFormDataReadBoolean.ts +14 -1
- package/src/internal/_httpFormDataReadFile.ts +11 -0
- package/src/internal/_httpFormDataReadNumber.ts +14 -1
- package/src/internal/_httpFormDataReadString.ts +15 -1
- package/src/internal/_httpHeaderReadBigint.ts +17 -1
- package/src/internal/_httpHeaderReadBoolean.ts +12 -0
- package/src/internal/_httpHeaderReadNumber.ts +17 -1
- package/src/internal/_httpParameterReadBigint.ts +14 -0
- package/src/internal/_httpParameterReadBoolean.ts +11 -0
- package/src/internal/_httpParameterReadNumber.ts +14 -0
- package/src/internal/_httpParameterReadString.ts +17 -2
- package/src/internal/_httpQueryParseURLSearchParams.ts +14 -0
- package/src/internal/_httpQueryReadArray.ts +9 -0
- package/src/internal/_httpQueryReadBigint.ts +18 -1
- package/src/internal/_httpQueryReadBoolean.ts +15 -1
- package/src/internal/_httpQueryReadNumber.ts +18 -1
- package/src/internal/_httpQueryReadString.ts +15 -1
- package/src/internal/_isBetween.ts +8 -0
- package/src/internal/_isBigintString.ts +11 -0
- package/src/internal/_isFormatByte.ts +12 -0
- package/src/internal/_isFormatDate.ts +11 -0
- package/src/internal/_isFormatDateTime.ts +13 -0
- package/src/internal/_isFormatDuration.ts +13 -0
- package/src/internal/_isFormatEmail.ts +13 -0
- package/src/internal/_isFormatHostname.ts +12 -0
- package/src/internal/_isFormatIdnEmail.ts +14 -0
- package/src/internal/_isFormatIdnHostname.ts +14 -0
- package/src/internal/_isFormatIpv4.ts +11 -0
- package/src/internal/_isFormatIpv6.ts +12 -0
- package/src/internal/_isFormatIri.ts +11 -0
- package/src/internal/_isFormatIriReference.ts +13 -0
- package/src/internal/_isFormatJsonPointer.ts +11 -0
- package/src/internal/_isFormatPassword.ts +11 -0
- package/src/internal/_isFormatRegex.ts +11 -0
- package/src/internal/_isFormatRelativeJsonPointer.ts +11 -0
- package/src/internal/_isFormatTime.ts +12 -0
- package/src/internal/_isFormatUri.ts +15 -0
- package/src/internal/_isFormatUriReference.ts +11 -0
- package/src/internal/_isFormatUriTemplate.ts +14 -1
- package/src/internal/_isFormatUrl.ts +15 -0
- package/src/internal/_isFormatUuid.ts +11 -0
- package/src/internal/_isMultipleOf.ts +11 -0
- package/src/internal/_isTypeFloat.ts +9 -0
- package/src/internal/_isTypeInt16.ts +8 -0
- package/src/internal/_isTypeInt32.ts +8 -0
- package/src/internal/_isTypeInt64.ts +11 -0
- package/src/internal/_isTypeInt64Bigint.ts +8 -0
- package/src/internal/_isTypeInt8.ts +8 -0
- package/src/internal/_isTypeUint16.ts +8 -0
- package/src/internal/_isTypeUint32.ts +8 -0
- package/src/internal/_isTypeUint64.ts +11 -0
- package/src/internal/_isTypeUint64Bigint.ts +8 -0
- package/src/internal/_isTypeUint8.ts +8 -0
- package/src/internal/_isUniqueItems.ts +46 -0
- package/src/internal/_jsonStringifyArray.ts +2 -0
- package/src/internal/_jsonStringifyElement.ts +2 -0
- package/src/internal/_jsonStringifyNumber.ts +9 -0
- package/src/internal/_jsonStringifyProperty.ts +3 -1
- package/src/internal/_jsonStringifyRest.ts +11 -0
- package/src/internal/_jsonStringifyString.ts +13 -0
- package/src/internal/_jsonStringifyTail.ts +8 -0
- package/src/internal/_llmApplicationFinalize.ts +13 -0
- package/src/internal/_notationAny.ts +14 -0
- package/src/internal/_notationAssign.ts +12 -0
- package/src/internal/_notationKebab.ts +9 -0
- package/src/internal/_notationKeyCollision.ts +8 -0
- package/src/internal/_notationSnake.ts +12 -0
- package/src/internal/_parseLlmArguments.ts +12 -0
- package/src/internal/_plainCloneAny.ts +15 -0
- package/src/internal/_randomArray.ts +42 -20
- package/src/internal/_randomBigint.ts +116 -3
- package/src/internal/_randomBoolean.ts +8 -0
- package/src/internal/_randomFormatByte.ts +8 -0
- package/src/internal/_randomFormatDate.ts +10 -0
- package/src/internal/_randomFormatDatetime.ts +10 -0
- package/src/internal/_randomFormatDuration.ts +8 -0
- package/src/internal/_randomFormatEmail.ts +8 -0
- package/src/internal/_randomFormatHostname.ts +15 -1
- package/src/internal/_randomFormatIdnEmail.ts +13 -0
- package/src/internal/_randomFormatIdnHostname.ts +12 -0
- package/src/internal/_randomFormatIpv4.ts +8 -0
- package/src/internal/_randomFormatIpv6.ts +8 -0
- package/src/internal/_randomFormatIri.ts +11 -0
- package/src/internal/_randomFormatIriReference.ts +12 -0
- package/src/internal/_randomFormatJsonPointer.ts +12 -0
- package/src/internal/_randomFormatPassword.ts +13 -0
- package/src/internal/_randomFormatRegex.ts +8 -0
- package/src/internal/_randomFormatRelativeJsonPointer.ts +8 -0
- package/src/internal/_randomFormatTime.ts +13 -0
- package/src/internal/_randomFormatUri.ts +12 -0
- package/src/internal/_randomFormatUriReference.ts +12 -0
- package/src/internal/_randomFormatUriTemplate.ts +12 -0
- package/src/internal/_randomFormatUrl.ts +12 -0
- package/src/internal/_randomFormatUuid.ts +13 -0
- package/src/internal/_randomInteger.ts +99 -33
- package/src/internal/_randomMultiple.ts +47 -15
- package/src/internal/_randomNumber.ts +107 -38
- package/src/internal/_randomPattern.ts +12 -0
- package/src/internal/_randomPick.ts +25 -7
- package/src/internal/_randomString.ts +36 -13
- package/src/internal/_randomStringLength.ts +31 -1
- package/src/internal/_stringLength.ts +11 -0
- package/src/internal/_stringLengthGte.ts +11 -0
- package/src/internal/_stringLengthLte.ts +11 -0
- package/src/internal/_throwTypeGuardError.ts +9 -0
- package/src/internal/_validateReport.ts +15 -0
- package/src/internal/private/__notationRename.ts +5 -0
- package/src/internal/private/__randomComposition.ts +27 -3
- package/src/internal/private/__randomEpoch.ts +15 -0
- package/src/json.ts +49 -14
- package/src/llm.ts +45 -26
- package/src/module.ts +1 -935
- package/src/notations.ts +60 -0
- package/src/plain.ts +38 -0
- package/src/protobuf.ts +41 -7
- package/src/reflect.ts +16 -12
- package/src/transform.ts +17 -0
- package/native/cmd/ttsc-typia/boolean_literal_discriminant_schema_transform_test.go +0 -374
- package/native/cmd/ttsc-typia/build_reports_semantic_diagnostics_test.go +0 -34
- package/native/cmd/ttsc-typia/build_reports_syntactic_diagnostics_test.go +0 -34
- package/native/cmd/ttsc-typia/command_routes_and_diagnostics_coverage_test.go +0 -316
- package/native/cmd/ttsc-typia/compare_less_transform_test.go +0 -180
- package/native/cmd/ttsc-typia/compare_method_delegation_transform_test.go +0 -173
- package/native/cmd/ttsc-typia/compare_native_object_overmatch_transform_test.go +0 -161
- package/native/cmd/ttsc-typia/compare_template_literal_union_transform_test.go +0 -241
- package/native/cmd/ttsc-typia/compare_union_discrimination_transform_test.go +0 -289
- package/native/cmd/ttsc-typia/escaped_property_key_path_transform_test.go +0 -193
- package/native/cmd/ttsc-typia/finite_option_number_leaf_transform_test.go +0 -240
- package/native/cmd/ttsc-typia/intersection_all_never_union_transform_test.go +0 -168
- package/native/cmd/ttsc-typia/intersection_brand_transform_test.go +0 -267
- package/native/cmd/ttsc-typia/is_object_function_member_transform_test.go +0 -205
- package/native/cmd/ttsc-typia/json_is_stringify_finite_number_transform_test.go +0 -198
- package/native/cmd/ttsc-typia/json_stringify_contextual_undefined_transform_test.go +0 -556
- package/native/cmd/ttsc-typia/json_stringify_special_key_transform_test.go +0 -238
- package/native/cmd/ttsc-typia/notation_dynamic_keys_transform_test.go +0 -286
- package/native/cmd/ttsc-typia/notation_literal_collision_transform_test.go +0 -164
- package/native/cmd/ttsc-typia/plain_prune_union_object_overmatch_transform_test.go +0 -219
- package/native/cmd/ttsc-typia/recursive_container_helper_index_transform_test.go +0 -206
- package/native/cmd/ttsc-typia/reflect_literals_bigint_transform_test.go +0 -148
- package/native/cmd/ttsc-typia/reflect_schema_bigint_transform_test.go +0 -173
- package/native/cmd/ttsc-typia/run_default_build_route_test.go +0 -31
- package/native/cmd/ttsc-typia/shallow_depth_runtime_test.go +0 -173
- package/native/cmd/ttsc-typia/shallow_factory_depth_runtime_test.go +0 -171
- package/native/cmd/ttsc-typia/symbol_index_domain_transform_test.go +0 -316
- package/native/cmd/ttsc-typia/transform_declaration_source_produces_no_javascript_test.go +0 -67
- package/native/cmd/ttsc-typia/transform_single_file_js_empty_emit_reports_no_output_test.go +0 -100
- package/native/core/factories/internal/metadata/optional_coalesce_coverage_test.go +0 -38
- package/native/core/programmers/functional/functional_assert_helper_coverage_test.go +0 -26
- package/native/core/programmers/iterate/iterate_check_coverage_test.go +0 -96
- package/native/core/programmers/programmer_direct_helper_coverage_test.go +0 -70
- package/native/core/schemas/metadata/IMetadataDictionary.go +0 -8
- package/native/core/schemas/protobuf/protobuf_marker_coverage_test.go +0 -58
- package/native/core/typings/Writable.go +0 -5
- package/native/transform/ImportTransformer.go +0 -285
- package/native/transform/TypiaGenerator.go +0 -171
- package/native/transform/features/feature_transformer_entry_coverage_test.go +0 -59
- package/native/transform/features/http/http_transformer_entry_coverage_test.go +0 -65
- package/native/transform/features/json/json_transformer_entry_coverage_test.go +0 -56
- package/native/transform/features/llm/llm_transformer_entry_coverage_test.go +0 -50
- package/native/transform/features/notations/notation_transformer_entry_coverage_test.go +0 -58
- package/native/transform/features/plain/plain_transformer_entry_coverage_test.go +0 -61
- package/native/transform/features/protobuf/protobuf_transformer_entry_coverage_test.go +0 -56
- package/native/transform/features/reflect/reflect_transformer_entry_coverage_test.go +0 -47
- package/native/transform/import_transformer_coverage_test.go +0 -153
- package/native/transform/typia_generator_helpers_coverage_test.go +0 -166
|
@@ -2,6 +2,13 @@ package iterate
|
|
|
2
2
|
|
|
3
3
|
import nativemetadata "github.com/samchon/typia/packages/typia/native/core/schemas/metadata"
|
|
4
4
|
|
|
5
|
+
// Json_schema_array_export_props is the argument record of
|
|
6
|
+
// Json_schema_array_export, which converts an array type to JSON schemas.
|
|
7
|
+
//
|
|
8
|
+
// @evidence contracts/common.md#principled-implementation It is the argument record of Json_schema_array_export, which converts an array type to JSON schemas; its 2 fields (Components, Array) are named so that a producer and a consumer cannot transpose them.
|
|
9
|
+
// @evidence contracts/common.md#clear-and-simple-design A 2-field record with no methods.
|
|
10
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts A data record: it derives, defaults and validates nothing.
|
|
11
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states what the record is.
|
|
5
12
|
type Json_schema_array_export_props struct {
|
|
6
13
|
Components *OpenApi_IComponents
|
|
7
14
|
Array *nativemetadata.MetadataArray
|
|
@@ -55,6 +62,15 @@ func json_schema_array(props struct {
|
|
|
55
62
|
return factory()
|
|
56
63
|
}
|
|
57
64
|
|
|
65
|
+
// Json_schema_array_export converts an array type to its JSON schemas: an
|
|
66
|
+
// `array` schema whose items come from the element metadata, or a reference to
|
|
67
|
+
// the component of a recursive array type, which is registered the first time it
|
|
68
|
+
// is met.
|
|
69
|
+
//
|
|
70
|
+
// @evidence contracts/common.md#principled-implementation It converts an array type to its JSON schemas: an `array` schema whose items come from the element metadata, or a reference to the component of a recursive array type, which is registered the first time it is met.
|
|
71
|
+
// @evidence contracts/common.md#clear-and-simple-design One exported function; the pieces that repeat live in private helpers of the same file.
|
|
72
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The only state it changes is the components record it is given.
|
|
73
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states what it builds.
|
|
58
74
|
func Json_schema_array_export(props Json_schema_array_export_props) []JsonSchema {
|
|
59
75
|
return json_schema_array(struct {
|
|
60
76
|
components *OpenApi_IComponents
|
|
@@ -12,6 +12,13 @@ func json_schema_bigint(atomic *nativemetadata.MetadataAtomic) []JsonSchema {
|
|
|
12
12
|
})
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
// Json_schema_bigint_export converts a bigint atomic to its JSON schemas: an
|
|
16
|
+
// `integer` schema, one per type-tag plugin row.
|
|
17
|
+
//
|
|
18
|
+
// @evidence contracts/common.md#principled-implementation It converts a bigint atomic to its JSON schemas: an `integer` schema, one per type-tag plugin row.
|
|
19
|
+
// @evidence contracts/common.md#clear-and-simple-design A one-line exported wrapper over the package-private function.
|
|
20
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The wrapper has no logic of its own.
|
|
21
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states what it builds.
|
|
15
22
|
func Json_schema_bigint_export(atomic *nativemetadata.MetadataAtomic) []JsonSchema {
|
|
16
23
|
return json_schema_bigint(atomic)
|
|
17
24
|
}
|
|
@@ -12,6 +12,13 @@ func json_schema_boolean(atomic *nativemetadata.MetadataAtomic) []JsonSchema {
|
|
|
12
12
|
})
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
// Json_schema_boolean_export converts a boolean atomic to its JSON schemas: a
|
|
16
|
+
// `boolean` schema, one per type-tag plugin row.
|
|
17
|
+
//
|
|
18
|
+
// @evidence contracts/common.md#principled-implementation It converts a boolean atomic to its JSON schemas: a `boolean` schema, one per type-tag plugin row.
|
|
19
|
+
// @evidence contracts/common.md#clear-and-simple-design A one-line exported wrapper over the package-private function.
|
|
20
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The wrapper has no logic of its own.
|
|
21
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states what it builds.
|
|
15
22
|
func Json_schema_boolean_export(atomic *nativemetadata.MetadataAtomic) []JsonSchema {
|
|
16
23
|
return json_schema_boolean(atomic)
|
|
17
24
|
}
|
package/native/core/programmers/iterate/json_schema_discriminator_declaration_syntax_test.go
CHANGED
|
@@ -16,11 +16,16 @@ import (
|
|
|
16
16
|
// referenced object type carrying a common literal tag, never on which bucket
|
|
17
17
|
// the metadata factory happened to file it under.
|
|
18
18
|
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
19
|
+
// 1. Build the interface, alias, and mixed forms of one tagged union.
|
|
20
|
+
// 2. Assert each emits the identical propertyName and mapping.
|
|
21
|
+
// 3. Assert the negative shapes -- no common tag, a non-object member, a
|
|
22
|
+
// literal (inline) member, and an alias that does not name a lone object --
|
|
23
|
+
// still emit no discriminator, so the resolution cannot over-emit.
|
|
24
|
+
//
|
|
25
|
+
// @evidence contracts/testing.md#behavioral-verification Discriminator emission is run on constructed metadata modeling interface and type-alias members; each case must emit the discriminator with the same property name and a mapping object of the expected size.
|
|
26
|
+
// @evidence contracts/testing.md#independent-expectations Both declaration forms export the same $ref, so eligibility cannot depend on syntax; the labeled cases and the expected property name and mapping size are authored.
|
|
27
|
+
// @evidence contracts/testing.md#distinguishing-cases Interface and alias forms are positives; shapes that must not produce a discriminator are covered by the negative rows of the same table.
|
|
28
|
+
// @evidence contracts/testing.md#execution-ownership The canonical native Go command (pnpm test:go:native) runs this same-package Test function in process. It calls the schema writer on constructed metadata with no checker, filesystem fixture or process.
|
|
24
29
|
func TestJsonSchemaDiscriminatorDeclarationSyntax(t *testing.T) {
|
|
25
30
|
circle := func() *nativemetadata.MetadataObject {
|
|
26
31
|
return discriminatorObject("Circle", "type", "circle")
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
package iterate
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
|
-
"strconv"
|
|
5
4
|
"strings"
|
|
6
5
|
|
|
7
6
|
nativemetadata "github.com/samchon/typia/packages/typia/native/core/schemas/metadata"
|
|
7
|
+
nativeutils "github.com/samchon/typia/packages/typia/native/core/utils"
|
|
8
8
|
)
|
|
9
9
|
|
|
10
10
|
func json_schema_jsDocTags(schema JsonSchema, jsDocTags []nativemetadata.IJsDocTagInfo) JsonSchema {
|
|
@@ -31,6 +31,13 @@ func json_schema_jsDocTags_value(tag nativemetadata.IJsDocTagInfo) (string, bool
|
|
|
31
31
|
return "", false
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
// json_schema_jsDocTags_cast reads an `@x-*` tag's text as a JSON value.
|
|
35
|
+
//
|
|
36
|
+
// Numbers use JavaScript's `Number()` grammar, the grammar of the v12 cast this
|
|
37
|
+
// ports (samchon/typia#2442), so `0x10` is 16 while Go-only spellings such as
|
|
38
|
+
// `0x1p4`, `1_000`, and `inf` stay text. Only finite numbers become numbers: the
|
|
39
|
+
// schema is JSON, which has no NaN or infinity, so `NaN`, `Infinity`, and an
|
|
40
|
+
// overflowing `1e400` keep their text instead of degrading to `null`.
|
|
34
41
|
func json_schema_jsDocTags_cast(value string) any {
|
|
35
42
|
if value == "true" {
|
|
36
43
|
return true
|
|
@@ -38,8 +45,8 @@ func json_schema_jsDocTags_cast(value string) any {
|
|
|
38
45
|
if value == "false" {
|
|
39
46
|
return false
|
|
40
47
|
}
|
|
41
|
-
if
|
|
42
|
-
return
|
|
48
|
+
if reading := nativeutils.NumberUtil.Read(value); reading.Numeric && reading.Finite {
|
|
49
|
+
return reading.Value
|
|
43
50
|
}
|
|
44
51
|
if value == "null" {
|
|
45
52
|
return nil
|
package/native/core/programmers/iterate/json_schema_jsdoc_tags_cast_reads_javascript_numbers_test.go
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
package iterate
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"encoding/json"
|
|
5
|
+
"math"
|
|
6
|
+
"reflect"
|
|
7
|
+
"testing"
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
// TestJsonSchemaJsDocTagsCastReadsJavaScriptNumbers verifies the `@x-*`
|
|
11
|
+
// extension cast.
|
|
12
|
+
//
|
|
13
|
+
// The Go port swapped the v12 cast's JavaScript `Number()` grammar for Go's
|
|
14
|
+
// float syntax (samchon/typia#2442). `NaN` and every `Inf` spelling then became
|
|
15
|
+
// floats that `encoding/json` refuses and JavaScript prints as `null`, while
|
|
16
|
+
// `0x10` stopped being a number and `0x1p4` / `1_000` started being one. The
|
|
17
|
+
// expectations restore v12's numbers where they are finite and keep the text
|
|
18
|
+
// where JSON has no number: a non-finite spelling stays a string instead of
|
|
19
|
+
// degrading to `null`, and empty text stays `""` instead of v12's `0`.
|
|
20
|
+
//
|
|
21
|
+
// 1. Cast every row of the issue's table.
|
|
22
|
+
// 2. Assert no result is NaN or an infinity, and every result marshals.
|
|
23
|
+
//
|
|
24
|
+
// @evidence contracts/testing.md#behavioral-verification The @x- extension cast is called on JavaScript number spellings (hex, NaN, infinities, exponents) and ordinary text; each result must equal the authored value and numbers must marshal as JSON.
|
|
25
|
+
// @evidence contracts/testing.md#independent-expectations The JavaScript Number() grammar defines which spellings are numbers; expected values are authored literals and JSON marshaling is the independent check.
|
|
26
|
+
// @evidence contracts/testing.md#distinguishing-cases Accepted JavaScript spellings and Go-only spellings give positives and negatives.
|
|
27
|
+
// @evidence contracts/testing.md#execution-ownership The canonical native Go command (pnpm test:go:native) runs this same-package Test function in process. It calls the cast and encoding/json in memory with no checker, filesystem fixture or process.
|
|
28
|
+
func TestJsonSchemaJsDocTagsCastReadsJavaScriptNumbers(t *testing.T) {
|
|
29
|
+
for _, item := range []struct {
|
|
30
|
+
text string
|
|
31
|
+
expected any
|
|
32
|
+
}{
|
|
33
|
+
{"NaN", "NaN"},
|
|
34
|
+
{"nan", "nan"},
|
|
35
|
+
{"Infinity", "Infinity"},
|
|
36
|
+
{"-Infinity", "-Infinity"},
|
|
37
|
+
{"infinity", "infinity"},
|
|
38
|
+
{"inf", "inf"},
|
|
39
|
+
{"Inf", "Inf"},
|
|
40
|
+
{"1e400", "1e400"},
|
|
41
|
+
{"0x10", float64(16)},
|
|
42
|
+
{"0b101", float64(5)},
|
|
43
|
+
{"0o7", float64(7)},
|
|
44
|
+
{"0x1p4", "0x1p4"},
|
|
45
|
+
{"1_000", "1_000"},
|
|
46
|
+
{"", ""},
|
|
47
|
+
{"-0", float64(0)},
|
|
48
|
+
{"+5", float64(5)},
|
|
49
|
+
{".5", 0.5},
|
|
50
|
+
{"1e3", float64(1000)},
|
|
51
|
+
{"true", true},
|
|
52
|
+
{"false", false},
|
|
53
|
+
{"null", nil},
|
|
54
|
+
{"text", "text"},
|
|
55
|
+
} {
|
|
56
|
+
actual := json_schema_jsDocTags_cast(item.text)
|
|
57
|
+
if reflect.DeepEqual(actual, item.expected) == false {
|
|
58
|
+
t.Fatalf("cast(%q) = %#v, expected %#v", item.text, actual, item.expected)
|
|
59
|
+
}
|
|
60
|
+
if number, ok := actual.(float64); ok {
|
|
61
|
+
if math.IsNaN(number) || math.IsInf(number, 0) || math.Signbit(number) && number == 0 {
|
|
62
|
+
t.Fatalf("cast(%q) = %v violates the finite, normalized-zero contract", item.text, number)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if _, err := json.Marshal(actual); err != nil {
|
|
66
|
+
t.Fatalf("cast(%q) does not marshal: %v", item.text, err)
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -5,6 +5,13 @@ import (
|
|
|
5
5
|
nativemetadata "github.com/samchon/typia/packages/typia/native/core/schemas/metadata"
|
|
6
6
|
)
|
|
7
7
|
|
|
8
|
+
// OpenApi_IComponents is the `components` of a JSON schema document being built:
|
|
9
|
+
// the named schemas and the order in which they were first registered.
|
|
10
|
+
//
|
|
11
|
+
// @evidence contracts/common.md#principled-implementation It is the `components` of a JSON schema document being built: the named schemas and the order in which they were first registered; its 2 fields (Schemas, Order) are named so that a producer and a consumer cannot transpose them.
|
|
12
|
+
// @evidence contracts/common.md#clear-and-simple-design The schema map owns lookup while Order owns discovery sequence; registration and literal rendering are methods on that shared store.
|
|
13
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Registration records new keys before insertion and rendering follows the recorded sequence rather than relying on Go map iteration.
|
|
14
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states what the record is.
|
|
8
15
|
type OpenApi_IComponents struct {
|
|
9
16
|
Schemas map[string]JsonSchema
|
|
10
17
|
// Order records the insertion sequence of Schemas keys so the emitted
|
|
@@ -18,6 +25,11 @@ type OpenApi_IComponents struct {
|
|
|
18
25
|
// ToLiteral renders the components as an order-preserving object literal input
|
|
19
26
|
// for LiteralFactory. The `schemas` member keeps the insertion order recorded
|
|
20
27
|
// in Order so the emitted `components.schemas` matches the legacy TS output.
|
|
28
|
+
//
|
|
29
|
+
// @evidence contracts/common.md#principled-implementation A Go map has no order, so the schemas are written as an ordered object in the discovery order that Order recorded, which keeps the emitted `components.schemas` as the TypeScript implementation emitted it.
|
|
30
|
+
// @evidence contracts/common.md#clear-and-simple-design One method over Order and Schemas.
|
|
31
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Order is recorded data and nothing is sorted; an ordered key without a schema is skipped.
|
|
32
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states the order preservation.
|
|
21
33
|
func (components *OpenApi_IComponents) ToLiteral() nativefactories.LiteralFactory_OrderedObject {
|
|
22
34
|
schemas := make(map[string]any, len(components.Schemas))
|
|
23
35
|
keys := make([]string, 0, len(components.Order))
|
|
@@ -52,6 +64,13 @@ func (components *OpenApi_IComponents) emplaceSchemaKey(key string) {
|
|
|
52
64
|
components.Order = append(components.Order, key)
|
|
53
65
|
}
|
|
54
66
|
|
|
67
|
+
// Json_schema_native_export_props is the argument record of
|
|
68
|
+
// Json_schema_native_export, which converts a built-in class to JSON schemas.
|
|
69
|
+
//
|
|
70
|
+
// @evidence contracts/common.md#principled-implementation It is the argument record of Json_schema_native_export, which converts a built-in class to JSON schemas; its 2 fields (Components, Native) are named so that a producer and a consumer cannot transpose them.
|
|
71
|
+
// @evidence contracts/common.md#clear-and-simple-design A 2-field record with no methods.
|
|
72
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts A data record: it derives, defaults and validates nothing.
|
|
73
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states what the record is.
|
|
55
74
|
type Json_schema_native_export_props struct {
|
|
56
75
|
Components *OpenApi_IComponents
|
|
57
76
|
Native *nativemetadata.MetadataNative
|
|
@@ -95,6 +114,14 @@ func json_schema_native(props struct {
|
|
|
95
114
|
})
|
|
96
115
|
}
|
|
97
116
|
|
|
117
|
+
// Json_schema_native_export converts a built-in class to its JSON schemas: a
|
|
118
|
+
// binary string for Blob and File, and otherwise a reference to an empty object
|
|
119
|
+
// component that is registered the first time it is met.
|
|
120
|
+
//
|
|
121
|
+
// @evidence contracts/common.md#principled-implementation It converts a built-in class to its JSON schemas: a binary string for Blob and File, and otherwise a reference to an empty object component that is registered the first time it is met.
|
|
122
|
+
// @evidence contracts/common.md#clear-and-simple-design One exported function; the pieces that repeat live in private helpers of the same file.
|
|
123
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The only state it changes is the components record it is given.
|
|
124
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states what it builds.
|
|
98
125
|
func Json_schema_native_export(props Json_schema_native_export_props) []JsonSchema {
|
|
99
126
|
return json_schema_native(struct {
|
|
100
127
|
components *OpenApi_IComponents
|
|
@@ -12,6 +12,13 @@ func json_schema_number(atomic *nativemetadata.MetadataAtomic) []JsonSchema {
|
|
|
12
12
|
})
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
// Json_schema_number_export converts a number atomic to its JSON schemas: a
|
|
16
|
+
// `number` schema, one per type-tag plugin row.
|
|
17
|
+
//
|
|
18
|
+
// @evidence contracts/common.md#principled-implementation It converts a number atomic to its JSON schemas: a `number` schema, one per type-tag plugin row.
|
|
19
|
+
// @evidence contracts/common.md#clear-and-simple-design A one-line exported wrapper over the package-private function.
|
|
20
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The wrapper has no logic of its own.
|
|
21
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states what it builds.
|
|
15
22
|
func Json_schema_number_export(atomic *nativemetadata.MetadataAtomic) []JsonSchema {
|
|
16
23
|
return json_schema_number(atomic)
|
|
17
24
|
}
|
|
@@ -15,6 +15,11 @@ import (
|
|
|
15
15
|
//
|
|
16
16
|
// 1. Insert two patterns, then replace the first pattern with new metadata and schema values.
|
|
17
17
|
// 2. Assert the ordered keys remain unique and the map retains the replacement pair.
|
|
18
|
+
//
|
|
19
|
+
// @evidence contracts/testing.md#behavioral-verification Pattern properties are recorded with a repeated pattern; the key order must keep the first position and the replacement pair must be retained.
|
|
20
|
+
// @evidence contracts/testing.md#independent-expectations Replacing an existing key without moving it is JavaScript object assignment semantics; the order is authored.
|
|
21
|
+
// @evidence contracts/testing.md#distinguishing-cases One repeated pattern; distinct patterns are covered by ordering in the same fixture.
|
|
22
|
+
// @evidence contracts/testing.md#execution-ownership The canonical native Go command (pnpm test:go:native) runs this same-package Test function in process. It calls the order recorder in memory with no checker, filesystem fixture or process.
|
|
18
23
|
func TestJsonSchemaPatternPropertyOrderPreservesFirstPosition(t *testing.T) {
|
|
19
24
|
first := &nativemetadata.MetadataSchema{}
|
|
20
25
|
replacement := &nativemetadata.MetadataSchema{}
|
|
@@ -2,6 +2,13 @@ package iterate
|
|
|
2
2
|
|
|
3
3
|
import nativemetadata "github.com/samchon/typia/packages/typia/native/core/schemas/metadata"
|
|
4
4
|
|
|
5
|
+
// JsonSchema is one JSON schema, an untyped keyword map. The keywords are the
|
|
6
|
+
// ones of the OpenAPI schema dialect that the schema builders emit.
|
|
7
|
+
//
|
|
8
|
+
// @evidence contracts/common.md#principled-implementation It is one JSON schema, an untyped keyword map. The keywords are the ones of the OpenAPI schema dialect that the schema builders emit.
|
|
9
|
+
// @evidence contracts/common.md#clear-and-simple-design A single type declaration.
|
|
10
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts A declaration only.
|
|
11
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states what the type is.
|
|
5
12
|
type JsonSchema map[string]any
|
|
6
13
|
|
|
7
14
|
func json_schema_plugin(props struct {
|
|
@@ -12,6 +12,15 @@ type json_schema_station_props struct {
|
|
|
12
12
|
metadata *nativemetadata.MetadataSchema
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
// Json_schema_station_props is the argument record of Json_schema_station, which
|
|
16
|
+
// converts a metadata schema to a JSON schema. BlockNever makes the conversion
|
|
17
|
+
// return nil instead of a schema with no type restriction when metadata yields no member,
|
|
18
|
+
// and Attribute holds the keywords that are merged into the result.
|
|
19
|
+
//
|
|
20
|
+
// @evidence contracts/common.md#principled-implementation It is the argument record of Json_schema_station, which converts a metadata schema to a JSON schema; its 4 fields (BlockNever, Components, Attribute, Metadata) are named so that a producer and a consumer cannot transpose them.
|
|
21
|
+
// @evidence contracts/common.md#clear-and-simple-design A 4-field record with no methods.
|
|
22
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts A data record: it derives, defaults and validates nothing.
|
|
23
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states what the record is and explains its non-obvious fields.
|
|
15
24
|
type Json_schema_station_props struct {
|
|
16
25
|
BlockNever bool
|
|
17
26
|
Components *OpenApi_IComponents
|
|
@@ -19,6 +28,13 @@ type Json_schema_station_props struct {
|
|
|
19
28
|
Metadata *nativemetadata.MetadataSchema
|
|
20
29
|
}
|
|
21
30
|
|
|
31
|
+
// Json_schema_station converts a metadata schema to a JSON schema, registering
|
|
32
|
+
// the components it refers to and merging the given attributes.
|
|
33
|
+
//
|
|
34
|
+
// @evidence contracts/common.md#principled-implementation It converts a metadata schema to a JSON schema, registering the components it refers to and merging the given attributes.
|
|
35
|
+
// @evidence contracts/common.md#clear-and-simple-design One exported function; the pieces that repeat live in private helpers of the same file.
|
|
36
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The only state it changes is the components record it is given.
|
|
37
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states what it builds.
|
|
22
38
|
func Json_schema_station(props Json_schema_station_props) JsonSchema {
|
|
23
39
|
return json_schema_station(json_schema_station_props{
|
|
24
40
|
blockNever: props.BlockNever,
|
|
@@ -12,6 +12,13 @@ func json_schema_string(atomic *nativemetadata.MetadataAtomic) []JsonSchema {
|
|
|
12
12
|
})
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
// Json_schema_string_export converts a string atomic to its JSON schemas: a
|
|
16
|
+
// `string` schema, one per type-tag plugin row.
|
|
17
|
+
//
|
|
18
|
+
// @evidence contracts/common.md#principled-implementation It converts a string atomic to its JSON schemas: a `string` schema, one per type-tag plugin row.
|
|
19
|
+
// @evidence contracts/common.md#clear-and-simple-design A one-line exported wrapper over the package-private function.
|
|
20
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The wrapper has no logic of its own.
|
|
21
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states what it builds.
|
|
15
22
|
func Json_schema_string_export(atomic *nativemetadata.MetadataAtomic) []JsonSchema {
|
|
16
23
|
return json_schema_string(atomic)
|
|
17
24
|
}
|
|
@@ -7,24 +7,28 @@ import (
|
|
|
7
7
|
nativefactories "github.com/samchon/typia/packages/typia/native/core/factories"
|
|
8
8
|
)
|
|
9
9
|
|
|
10
|
-
// OpenApiV3Downgrader rewrites an emended
|
|
10
|
+
// OpenApiV3Downgrader rewrites an emended schema collection into
|
|
11
11
|
// the OpenAPI 3.0 dialect. `json.schema`, `json.schemas`, and `json.application`
|
|
12
|
-
// all build their document through json_schema_station,
|
|
12
|
+
// all build their document through json_schema_station, whose normalized dialect
|
|
13
|
+
// uses 3.1-style schema keywords:
|
|
13
14
|
// it emits `const`, `prefixItems`, and a `{"type": "null"}` union member for a
|
|
14
15
|
// nullable type. None of those exist in 3.0, which spells the same three things
|
|
15
16
|
// as `enum`, `items` + `minItems`/`maxItems`, and the `nullable` flag.
|
|
16
17
|
//
|
|
17
|
-
// This is a port of `@typia/utils`' OpenApiV3Downgrader
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
// necessarily separate implementations of one contract; the port is kept
|
|
22
|
-
// deliberately literal so the correspondence stays reviewable, and
|
|
18
|
+
// This is a port of `@typia/utils`' OpenApiV3Downgrader. The Go transform cannot
|
|
19
|
+
// call into TypeScript, so the two are necessarily separate implementations of
|
|
20
|
+
// one contract; the port is kept deliberately literal so the correspondence stays
|
|
21
|
+
// reviewable, and
|
|
23
22
|
// `tests/test-typia-schema/src/features/json.schemas/test_json_schemas_v3_0_parity_converter.ts`
|
|
24
23
|
// pins the two owners against each other on every emitted construct.
|
|
25
24
|
//
|
|
26
25
|
// Only the components-and-schemas surface is ported. The TypeScript owner also
|
|
27
26
|
// downgrades paths, operations, and security schemes, none of which typia emits.
|
|
27
|
+
//
|
|
28
|
+
// @evidence contracts/common.md#principled-implementation It is the working state of OpenApiV3Downgrader; its 2 fields (Original, Downgraded) are named so that a producer and a consumer cannot transpose them.
|
|
29
|
+
// @evidence contracts/common.md#clear-and-simple-design A 2-field record with no methods.
|
|
30
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts A data record: it derives, defaults and validates nothing.
|
|
31
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states what the record is.
|
|
28
32
|
type OpenApiV3Downgrader_IComponentsCollection struct {
|
|
29
33
|
// Original is the emended 3.1 collection, read to resolve `$ref` targets
|
|
30
34
|
// while deciding nullability. It is never mutated.
|
|
@@ -39,6 +43,11 @@ type OpenApiV3Downgrader_IComponentsCollection struct {
|
|
|
39
43
|
// downgraded before its own key is registered, so the `X.Nullable` companions
|
|
40
44
|
// that its references create land ahead of it exactly as the TypeScript owner's
|
|
41
45
|
// argument-evaluation order places them.
|
|
46
|
+
//
|
|
47
|
+
// @evidence contracts/common.md#principled-implementation Every schema is downgraded in discovery order before its own key is registered, so the `X.Nullable` companions that its references create land ahead of it, and the input collection is only read.
|
|
48
|
+
// @evidence contracts/common.md#clear-and-simple-design One loop over the ordered keys that delegates each schema to the schema downgrade.
|
|
49
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Order comes from the recorded Order and not from sorting.
|
|
50
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states the order and why the companions come first.
|
|
42
51
|
func OpenApiV3Downgrader_downgrade_components(input *OpenApi_IComponents) *OpenApiV3Downgrader_IComponentsCollection {
|
|
43
52
|
collection := &OpenApiV3Downgrader_IComponentsCollection{
|
|
44
53
|
Original: input,
|
|
@@ -63,10 +72,20 @@ func OpenApiV3Downgrader_downgrade_components(input *OpenApi_IComponents) *OpenA
|
|
|
63
72
|
// OpenApiV3Downgrader_downgrade_schema rewrites one emended schema into 3.0.
|
|
64
73
|
//
|
|
65
74
|
// The emended dialect expresses a union as `oneOf` and nullability as a
|
|
66
|
-
// `{"type": "null"}` member of it. 3.0
|
|
75
|
+
// `{"type": "null"}` member of it. 3.0 supports oneOf but has no null type, so
|
|
76
|
+
// the schema is flattened
|
|
67
77
|
// into a union of concrete members, the null member is dropped, and the
|
|
68
78
|
// surviving members carry `nullable: true` instead. Constants collapse into the
|
|
69
79
|
// `enum` of a member of the same primitive type.
|
|
80
|
+
// Tuple positions become an item union with prefix-length bounds, losing
|
|
81
|
+
// positional and optional-prefix restrictions. Existing nullable companion names
|
|
82
|
+
// are reused without comparing their schemas. A pure null result retains the
|
|
83
|
+
// existing null-typed representation rather than acquiring a 3.0 nullable type.
|
|
84
|
+
//
|
|
85
|
+
// @evidence contracts/common.md#principled-implementation Constants merge into primitive enums, mixed null unions mark surviving members nullable, references may use nullable companions, and a discriminator survives only when each branch stays one member. Tuple conversion approximates positions and optional-prefix bounds. Existing nullable companion names are reused without schema comparison, and a pure null result keeps the existing null-typed representation; these are not universal lossless 3.0 mappings.
|
|
86
|
+
// @evidence contracts/common.md#clear-and-simple-design One recursive function with a visitor over the schema kinds, delegating tuples, objects and nullable references to named helpers.
|
|
87
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The rewrite follows the schema kinds and keywords of the dialect and special-cases no type name.
|
|
88
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states the flattening, the null handling and the constant folding.
|
|
70
89
|
func OpenApiV3Downgrader_downgrade_schema(collection *OpenApiV3Downgrader_IComponentsCollection, input JsonSchema) JsonSchema {
|
|
71
90
|
nullable := openApiV3Downgrader_is_nullable(map[string]bool{}, collection.Original, input)
|
|
72
91
|
union := []JsonSchema{}
|
|
@@ -198,7 +217,7 @@ func openApiV3Downgrader_downgrade_tuple(collection *OpenApiV3Downgrader_ICompon
|
|
|
198
217
|
elements := []JsonSchema{}
|
|
199
218
|
elements = append(elements, prefixItems...)
|
|
200
219
|
if rest := openApiV3Downgrader_schema(additional); rest != nil {
|
|
201
|
-
elements = append(elements,
|
|
220
|
+
elements = append(elements, rest)
|
|
202
221
|
}
|
|
203
222
|
if len(elements) == 0 {
|
|
204
223
|
items = JsonSchema{}
|
|
@@ -17,10 +17,15 @@ import (
|
|
|
17
17
|
// from that declared type: only keys it allows may survive, and `examples` — the
|
|
18
18
|
// one 3.0 does not define — must not.
|
|
19
19
|
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
20
|
+
// 1. Downgrade a boolean carrying `default`, and one also carrying attributes.
|
|
21
|
+
// 2. Assert each keeps every declared keyword and drops only `examples`.
|
|
22
|
+
// 3. Assert a keyword-less boolean still degrades to a bare `{"type": "boolean"}`
|
|
23
|
+
// and that a boolean inside a union keeps its `default`.
|
|
24
|
+
//
|
|
25
|
+
// @evidence contracts/testing.md#behavioral-verification The 3.0 downgrader is run on boolean schemas with default and other keywords and the serialized output is compared with the expected schema text.
|
|
26
|
+
// @evidence contracts/testing.md#independent-expectations OpenAPI 3.0 retains the declared keywords of a boolean schema; the expected JSON is authored.
|
|
27
|
+
// @evidence contracts/testing.md#distinguishing-cases Boolean schemas with and without extra keywords are compared row by row.
|
|
28
|
+
// @evidence contracts/testing.md#execution-ownership The canonical native Go command (pnpm test:go:native) runs this same-package Test function in process. It calls the downgrader and serializes in memory with no checker, filesystem fixture or process.
|
|
24
29
|
func TestOpenApiV3DowngraderCarriesBooleanKeywords(t *testing.T) {
|
|
25
30
|
collection := OpenApiV3Downgrader_downgrade_components(&OpenApi_IComponents{})
|
|
26
31
|
|
|
@@ -16,10 +16,15 @@ import (
|
|
|
16
16
|
// expected shapes below come from the OpenAPI 3.0 specification, not from what
|
|
17
17
|
// the downgrader happens to produce.
|
|
18
18
|
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
19
|
+
// 1. Downgrade a nullable atomic, a literal union, and a tuple.
|
|
20
|
+
// 2. Assert each uses the 3.0 spelling: nullable flag, enum, bounded array.
|
|
21
|
+
// 3. Assert no 3.1-only keyword (`const`, `prefixItems`, a null union member)
|
|
22
|
+
// survives.
|
|
23
|
+
//
|
|
24
|
+
// @evidence contracts/testing.md#behavioral-verification The 3.0 downgrader is run on nullable unions, literals and tuples; the output must equal the authored 3.0 text and no 3.1-only keyword may appear in the serialization.
|
|
25
|
+
// @evidence contracts/testing.md#independent-expectations OpenAPI 3.0 defines nullable, enum and items instead of null types, const and prefixItems; expected texts and the banned keywords are authored.
|
|
26
|
+
// @evidence contracts/testing.md#distinguishing-cases Nullable, literal and tuple constructs are each a row, with a keyword-leak check across all rows.
|
|
27
|
+
// @evidence contracts/testing.md#execution-ownership The canonical native Go command (pnpm test:go:native) runs this same-package Test function in process. It calls the downgrader and serializes in memory with no checker, filesystem fixture or process.
|
|
23
28
|
func TestOpenApiV3DowngraderRewritesDialect(t *testing.T) {
|
|
24
29
|
collection := OpenApiV3Downgrader_downgrade_components(&OpenApi_IComponents{})
|
|
25
30
|
|
|
@@ -7,6 +7,14 @@ func postfix_of_tuple(str string) string {
|
|
|
7
7
|
return str + " + \""
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
// Postfix_of_tuple_export turns a path postfix into the prefix of a tuple
|
|
11
|
+
// element's path: it drops the closing quote when there is one and otherwise
|
|
12
|
+
// appends ` + "` so the index can be added.
|
|
13
|
+
//
|
|
14
|
+
// @evidence contracts/common.md#principled-implementation It turns a path postfix into the prefix of a tuple element's path: it drops the closing quote when there is one and otherwise appends ` + "` so the index can be added.
|
|
15
|
+
// @evidence contracts/common.md#clear-and-simple-design A one-line exported wrapper over the package-private function.
|
|
16
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The wrapper has no logic of its own.
|
|
17
|
+
// @evidence contracts/common.md#meaningful-documentation The doc states what it builds.
|
|
10
18
|
func Postfix_of_tuple_export(str string) string {
|
|
11
19
|
return postfix_of_tuple(str)
|
|
12
20
|
}
|
|
@@ -25,6 +25,11 @@ import (
|
|
|
25
25
|
// 1. Count bare, alternation, nested, and non-capturing patterns.
|
|
26
26
|
// 2. Count the numeric span (only inline groups) as zero.
|
|
27
27
|
// 3. Count escaped parens as zero and a real group after `\\` as one.
|
|
28
|
+
//
|
|
29
|
+
// @evidence contracts/testing.md#behavioral-verification The capture-group counter is called on bare, alternation, nested, non-capturing, escaped and escaped-backslash patterns.
|
|
30
|
+
// @evidence contracts/testing.md#independent-expectations JavaScript regex group numbering defines each count; patterns and counts are authored literals.
|
|
31
|
+
// @evidence contracts/testing.md#distinguishing-cases Escaped parentheses and an unescaped group after an escaped backslash are the boundary rows.
|
|
32
|
+
// @evidence contracts/testing.md#execution-ownership The typia_native_internal Go command (go -C packages/typia/test test -tags typia_native_internal ../native/...) runs this same-package Test function in process. The tagged test calls the private counter directly in the same package with no checker, filesystem fixture or process.
|
|
28
33
|
func TestTemplateCountCapturingGroups(t *testing.T) {
|
|
29
34
|
cases := []struct {
|
|
30
35
|
pattern string
|
|
@@ -51,12 +56,17 @@ func TestTemplateCountCapturingGroups(t *testing.T) {
|
|
|
51
56
|
// TestTemplateFullyConstrained gates which tag matrices earn a capture.
|
|
52
57
|
//
|
|
53
58
|
// A placeholder is only captured when every OR row contributes at least one
|
|
54
|
-
//
|
|
59
|
+
// runtime condition, including exclusion; otherwise some row admits the base type unconditionally and
|
|
55
60
|
// honoring the others would reject values the type accepts.
|
|
56
61
|
//
|
|
57
62
|
// 1. Reject nil and empty matrices.
|
|
58
|
-
// 2. Accept a matrix whose every row has a
|
|
63
|
+
// 2. Accept a matrix whose every row has a runtime condition.
|
|
59
64
|
// 3. Reject a matrix with a row of only non-validating tags.
|
|
65
|
+
//
|
|
66
|
+
// @evidence contracts/testing.md#behavioral-verification The full-constraint gate is called on nil, empty, fully validating, mixed, exclusion-only and partially validating tag matrices, including an empty OR row.
|
|
67
|
+
// @evidence contracts/testing.md#independent-expectations A placeholder is captured only when every OR row has a runtime condition, including exclusion; matrices and verdicts are authored.
|
|
68
|
+
// @evidence contracts/testing.md#distinguishing-cases Nil, empty, empty-row and partial matrices are negatives; validating and exclusion-only matrices are positives.
|
|
69
|
+
// @evidence contracts/testing.md#execution-ownership The typia_native_internal Go command (go -C packages/typia/test test -tags typia_native_internal ../native/...) runs this same-package Test function in process. The tagged test calls the private gate directly in the same package with no checker, filesystem fixture or process.
|
|
60
70
|
func TestTemplateFullyConstrained(t *testing.T) {
|
|
61
71
|
validating := nativemetadata.IMetadataTypeTag{Name: "Minimum<0>", Validate: "0 <= $input"}
|
|
62
72
|
schemaOnly := nativemetadata.IMetadataTypeTag{Name: "Format<\"uuid\">"}
|
|
@@ -69,6 +79,8 @@ func TestTemplateFullyConstrained(t *testing.T) {
|
|
|
69
79
|
{"empty", [][]nativemetadata.IMetadataTypeTag{}, false},
|
|
70
80
|
{"single", [][]nativemetadata.IMetadataTypeTag{{validating}}, true},
|
|
71
81
|
{"mixed-row", [][]nativemetadata.IMetadataTypeTag{{schemaOnly, validating}}, true},
|
|
82
|
+
{"exclude-only", [][]nativemetadata.IMetadataTypeTag{{{Kind: "exclude", Schema: map[string]any{"not": map[string]any{"enum": []any{"no"}}}}}}, true},
|
|
83
|
+
{"empty-row", [][]nativemetadata.IMetadataTypeTag{{validating}, {}}, false},
|
|
72
84
|
{"schema-only-row", [][]nativemetadata.IMetadataTypeTag{{schemaOnly}}, false},
|
|
73
85
|
{"one-unconstrained-row", [][]nativemetadata.IMetadataTypeTag{{validating}, {schemaOnly}}, false},
|
|
74
86
|
}
|
|
@@ -88,6 +100,11 @@ func TestTemplateFullyConstrained(t *testing.T) {
|
|
|
88
100
|
//
|
|
89
101
|
// 1. Accept number, bigint, and string placeholders with validating tags.
|
|
90
102
|
// 2. Reject boolean, unconstrained, nullable, optional, multi-bucket.
|
|
103
|
+
//
|
|
104
|
+
// @evidence contracts/testing.md#behavioral-verification The capture decision is called on number, bigint and string placeholders with validating tags and on boolean, unconstrained, nullable, optional and multi-bucket placeholders.
|
|
105
|
+
// @evidence contracts/testing.md#independent-expectations Only sole required non-nullable primitives with runtime-checkable tags are captured; the verdicts are authored from that rule.
|
|
106
|
+
// @evidence contracts/testing.md#distinguishing-cases Three accepted kinds and seven rejected shapes separate capture from structural-only matching.
|
|
107
|
+
// @evidence contracts/testing.md#execution-ownership The typia_native_internal Go command (go -C packages/typia/test test -tags typia_native_internal ../native/...) runs this same-package Test function in process. The tagged test calls the private decision directly in the same package with no checker, filesystem fixture or process.
|
|
91
108
|
func TestTemplateConstrainedCapture(t *testing.T) {
|
|
92
109
|
minimum := [][]nativemetadata.IMetadataTypeTag{{{Name: "Minimum<0>", Validate: "0 <= $input"}}}
|
|
93
110
|
|
|
@@ -147,6 +164,11 @@ func TestTemplateConstrainedCapture(t *testing.T) {
|
|
|
147
164
|
// 5. An ambiguous placeholder has no direct capture; backtracking owns it.
|
|
148
165
|
// 6. A template with no constrained placeholder yields no captures and the
|
|
149
166
|
// historical pattern.
|
|
167
|
+
//
|
|
168
|
+
// @evidence contracts/testing.md#behavioral-verification The runtime template pattern builder is called on literal-plus-number, repeated number, sole string, bigint and ambiguous templates; the pattern text and capture index are compared.
|
|
169
|
+
// @evidence contracts/testing.md#independent-expectations JavaScript numbers capture groups by position, so indices are authored by counting groups in the expected pattern.
|
|
170
|
+
// @evidence contracts/testing.md#distinguishing-cases Each placeholder kind has a row and the ambiguous placeholder is the no-direct-capture case.
|
|
171
|
+
// @evidence contracts/testing.md#execution-ownership The typia_native_internal Go command (go -C packages/typia/test test -tags typia_native_internal ../native/...) runs this same-package Test function in process. The tagged test calls the private builder directly in the same package with no checker, filesystem fixture or process.
|
|
150
172
|
func TestTemplateRuntimePattern(t *testing.T) {
|
|
151
173
|
number := iterateTemplateAtomic("number", [][]nativemetadata.IMetadataTypeTag{{{Name: "Minimum<0>", Validate: "0 <= $input"}}})
|
|
152
174
|
numberB := iterateTemplateAtomic("number", [][]nativemetadata.IMetadataTypeTag{{{Name: "Maximum<9>", Validate: "$input <= 9"}}})
|
|
@@ -220,6 +242,11 @@ func TestTemplateRuntimePattern(t *testing.T) {
|
|
|
220
242
|
// TestTemplateRequiresBacktracking separates unique captures from ambiguous
|
|
221
243
|
// boundary searches and keeps each searched placeholder's standalone pattern
|
|
222
244
|
// faithful to its runtime base type.
|
|
245
|
+
//
|
|
246
|
+
// @evidence contracts/testing.md#behavioral-verification The backtracking decision is called on unique and ambiguous placeholders and each searched placeholder's standalone pattern is compared with its base type pattern.
|
|
247
|
+
// @evidence contracts/testing.md#independent-expectations A placeholder needs backtracking when its boundary can slide; verdicts and patterns are authored.
|
|
248
|
+
// @evidence contracts/testing.md#distinguishing-cases Unique captures versus ambiguous boundary searches form the pairs.
|
|
249
|
+
// @evidence contracts/testing.md#execution-ownership The typia_native_internal Go command (go -C packages/typia/test test -tags typia_native_internal ../native/...) runs this same-package Test function in process. The tagged test calls the private decision directly in the same package with no checker, filesystem fixture or process.
|
|
223
250
|
func TestTemplateRequiresBacktracking(t *testing.T) {
|
|
224
251
|
number := iterateTemplateAtomic("number", [][]nativemetadata.IMetadataTypeTag{{{Name: "Minimum<10>", Validate: "10 <= $input"}}})
|
|
225
252
|
str := iterateTemplateAtomic("string", [][]nativemetadata.IMetadataTypeTag{{{Name: "MinLength<3>", Validate: "$input.length >= 3"}}})
|
|
@@ -261,6 +288,11 @@ func TestTemplateRequiresBacktracking(t *testing.T) {
|
|
|
261
288
|
// 3. `${n}-${n}` clears ("-" not number-extendable); `${n}.${n}` does not (".").
|
|
262
289
|
// 4. A string before a sibling absorbs the separator, unpinning both itself and
|
|
263
290
|
// the number; a number before a string keeps both.
|
|
291
|
+
//
|
|
292
|
+
// @evidence contracts/testing.md#behavioral-verification The clear-boundary predicate is called on single literals, atomics, constants, nil and templates with adjacent variables and separators; each boundary verdict is compared.
|
|
293
|
+
// @evidence contracts/testing.md#independent-expectations A placeholder is pinned only when a literal edge or non-absorbed neighbor fixes the split; the verdict table is authored.
|
|
294
|
+
// @evidence contracts/testing.md#distinguishing-cases Sole, literal-fenced and adjacent-variable placeholders, number-extendable and non-extendable separators and string-before-number order each flip a verdict.
|
|
295
|
+
// @evidence contracts/testing.md#execution-ownership The typia_native_internal Go command (go -C packages/typia/test test -tags typia_native_internal ../native/...) runs this same-package Test function in process. The tagged test calls the private predicate directly in the same package with no checker, filesystem fixture or process.
|
|
264
296
|
func TestTemplateClearBoundary(t *testing.T) {
|
|
265
297
|
num := iterateTemplateAtomic("number", [][]nativemetadata.IMetadataTypeTag{{{Name: "Minimum<0>", Validate: "0 <= $input"}}})
|
|
266
298
|
str := iterateTemplateAtomic("string", [][]nativemetadata.IMetadataTypeTag{{{Name: "MinLength<1>", Validate: "$input.length >= 1"}}})
|
|
@@ -321,6 +353,11 @@ func TestTemplateClearBoundary(t *testing.T) {
|
|
|
321
353
|
// 2. variable_kind: number/bigint/string atomics map to themselves; everything
|
|
322
354
|
// else (boolean, constant-only, nil) is conservatively "string".
|
|
323
355
|
// 3. literal_first: the text's first rune, or not-ok for empty/non-literal/nil.
|
|
356
|
+
//
|
|
357
|
+
// @evidence contracts/testing.md#behavioral-verification The right-extension, variable-kind and literal-first helpers are called on number, bigint, string, boolean, constant, nil and empty inputs.
|
|
358
|
+
// @evidence contracts/testing.md#independent-expectations Number growth through digits, dot and exponent but not sign, and the conservative string default are authored from number grammar.
|
|
359
|
+
// @evidence contracts/testing.md#distinguishing-cases Each helper has accepted and rejected rows.
|
|
360
|
+
// @evidence contracts/testing.md#execution-ownership The typia_native_internal Go command (go -C packages/typia/test test -tags typia_native_internal ../native/...) runs this same-package Test function in process. The tagged test calls the private helpers directly in the same package with no checker, filesystem fixture or process.
|
|
324
361
|
func TestTemplateBoundaryHelpers(t *testing.T) {
|
|
325
362
|
for _, c := range []struct {
|
|
326
363
|
kind string
|
|
@@ -381,6 +418,11 @@ func TestTemplateBoundaryHelpers(t *testing.T) {
|
|
|
381
418
|
// 3. Sole template, whole-string tag only → unchanged whole-string conditions.
|
|
382
419
|
// 4. Sole template, string placeholder with an exclude tag → string conditions.
|
|
383
420
|
// 5. Union of constrained templates → no entry conditions, non-nil expression.
|
|
421
|
+
//
|
|
422
|
+
// @evidence contracts/testing.md#behavioral-verification The checker entry is built for sole templates with single-row, multi-row, whole-string and exclude tags and for a union of templates; condition counts and the inline expression are asserted.
|
|
423
|
+
// @evidence contracts/testing.md#independent-expectations Authored tag matrices and the stated threading rule give expected row and condition counts.
|
|
424
|
+
// @evidence contracts/testing.md#distinguishing-cases The original numeric, bigint, whole-string, exclusion and union scenarios change the matrix shape; the union case asserts no entry conditions and a non-nil expression.
|
|
425
|
+
// @evidence contracts/testing.md#execution-ownership The typia_native_internal Go command (go -C packages/typia/test test -tags typia_native_internal ../native/...) runs this same-package Test function in process. The tagged test builds AST nodes in memory with no checker, filesystem fixture or process.
|
|
384
426
|
func TestCheckTemplateInterpolationConditions(t *testing.T) {
|
|
385
427
|
emit := shimprinter.NewEmitContext()
|
|
386
428
|
factory := shimast.NewNodeFactory(shimast.NodeFactoryHooks{})
|
|
@@ -511,8 +553,8 @@ func TestCheckTemplateInterpolationConditions(t *testing.T) {
|
|
|
511
553
|
}
|
|
512
554
|
|
|
513
555
|
// 7. reducing an empty slice yields a literal (true/false) keyword.
|
|
514
|
-
if check_template_reduce(nil, shimast.KindBarBarToken)
|
|
515
|
-
t.Fatal("empty reduce should yield
|
|
556
|
+
if check_template_reduce(nil, shimast.KindBarBarToken).Kind != shimast.KindTrueKeyword {
|
|
557
|
+
t.Fatal("empty reduce should yield the true keyword")
|
|
516
558
|
}
|
|
517
559
|
}
|
|
518
560
|
|