From 513b92acac13e8e86ad2d9deac17e6e41363ed40 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Tue, 22 Oct 2024 15:32:46 +0900 Subject: [PATCH] Close ryoppippi/unplugin-typia#335: change `$` prefix to `_` for Svelte. As Svelte-Kit prohibits `$` starting instance name, I've changed typia v7 to utilize `_` starting functions internally generated. --- benchmark/package.json | 2 +- errors/package.json | 2 +- package.json | 2 +- packages/typescript-json/package.json | 4 +- src/factories/ExpressionFactory.ts | 4 +- src/internal/$httpParameterReadString.ts | 2 - src/internal/$isBetween.ts | 2 - src/internal/$notationCamel.ts | 13 - src/internal/$notationPascal.ts | 8 - src/internal/$randomBigint.ts | 6 - src/internal/$randomBoolean.ts | 1 - src/internal/$randomFormatHostname.ts | 6 - src/internal/$randomFormatIdnEmail.ts | 3 - src/internal/$randomFormatIdnHostname.ts | 3 - src/internal/$randomFormatIri.ts | 3 - src/internal/$randomFormatIriReference.ts | 3 - src/internal/$randomFormatJsonPointer.ts | 7 - src/internal/$randomFormatPassword.ts | 8 - .../$randomFormatRelativeJsonPointer.ts | 8 - src/internal/$randomFormatUri.ts | 3 - src/internal/$randomFormatUriReference.ts | 3 - src/internal/$randomFormatUriTemplate.ts | 3 - src/internal/$randomPick.ts | 9 - ...IProtobufWriter.ts => _IProtobufWriter.ts} | 2 +- ...{$ProtobufReader.ts => _ProtobufReader.ts} | 2 +- .../{$ProtobufSizer.ts => _ProtobufSizer.ts} | 4 +- ...{$ProtobufWriter.ts => _ProtobufWriter.ts} | 10 +- ...String.ts => _accessExpressionAsString.ts} | 2 +- .../{$assertGuard.ts => _assertGuard.ts} | 2 +- ...ts => _functionalTypeGuardErrorFactory.ts} | 2 +- ...ReadArray.ts => _httpFormDataReadArray.ts} | 2 +- ...adBigint.ts => _httpFormDataReadBigint.ts} | 2 +- ...taReadBlob.ts => _httpFormDataReadBlob.ts} | 2 +- ...Boolean.ts => _httpFormDataReadBoolean.ts} | 2 +- ...taReadFile.ts => _httpFormDataReadFile.ts} | 2 +- ...adNumber.ts => _httpFormDataReadNumber.ts} | 2 +- ...adString.ts => _httpFormDataReadString.ts} | 2 +- ...ReadBigint.ts => _httpHeaderReadBigint.ts} | 2 +- ...adBoolean.ts => _httpHeaderReadBoolean.ts} | 2 +- ...ReadNumber.ts => _httpHeaderReadNumber.ts} | 2 +- ...dBigint.ts => _httpParameterReadBigint.ts} | 2 +- ...oolean.ts => _httpParameterReadBoolean.ts} | 2 +- ...dNumber.ts => _httpParameterReadNumber.ts} | 2 +- src/internal/_httpParameterReadString.ts | 2 + ...s.ts => _httpQueryParseURLSearchParams.ts} | 2 +- ...eryReadArray.ts => _httpQueryReadArray.ts} | 2 +- ...yReadBigint.ts => _httpQueryReadBigint.ts} | 2 +- ...eadBoolean.ts => _httpQueryReadBoolean.ts} | 2 +- ...yReadNumber.ts => _httpQueryReadNumber.ts} | 2 +- ...yReadString.ts => _httpQueryReadString.ts} | 2 +- src/internal/_isBetween.ts | 2 + ...{$isBigintString.ts => _isBigintString.ts} | 2 +- ...ngifyNumber.ts => _jsonStringifyNumber.ts} | 2 +- ...StringifyRest.ts => _jsonStringifyRest.ts} | 2 +- ...ngifyString.ts => _jsonStringifyString.ts} | 2 +- ...StringifyTail.ts => _jsonStringifyTail.ts} | 2 +- ...Finalize.ts => _llmApplicationFinalize.ts} | 2 +- .../{$miscCloneAny.ts => _miscCloneAny.ts} | 2 +- .../{$notationAny.ts => _notationAny.ts} | 2 +- src/internal/_notationCamel.ts | 13 + src/internal/_notationPascal.ts | 8 + .../{$notationSnake.ts => _notationSnake.ts} | 2 +- .../{$randomArray.ts => _randomArray.ts} | 6 +- src/internal/_randomBigint.ts | 6 + src/internal/_randomBoolean.ts | 1 + ...ndomFormatByte.ts => _randomFormatByte.ts} | 2 +- ...ndomFormatDate.ts => _randomFormatDate.ts} | 6 +- ...atDatetime.ts => _randomFormatDatetime.ts} | 6 +- ...atDuration.ts => _randomFormatDuration.ts} | 6 +- ...omFormatEmail.ts => _randomFormatEmail.ts} | 6 +- src/internal/_randomFormatHostname.ts | 6 + src/internal/_randomFormatIdnEmail.ts | 3 + src/internal/_randomFormatIdnHostname.ts | 3 + ...ndomFormatIpv4.ts => _randomFormatIpv4.ts} | 6 +- ...ndomFormatIpv6.ts => _randomFormatIpv6.ts} | 6 +- src/internal/_randomFormatIri.ts | 3 + src/internal/_randomFormatIriReference.ts | 3 + src/internal/_randomFormatJsonPointer.ts | 7 + src/internal/_randomFormatPassword.ts | 8 + ...omFormatRegex.ts => _randomFormatRegex.ts} | 2 +- .../_randomFormatRelativeJsonPointer.ts | 8 + ...ndomFormatTime.ts => _randomFormatTime.ts} | 6 +- src/internal/_randomFormatUri.ts | 3 + src/internal/_randomFormatUriReference.ts | 3 + src/internal/_randomFormatUriTemplate.ts | 3 + ...randomFormatUrl.ts => _randomFormatUrl.ts} | 6 +- ...ndomFormatUuid.ts => _randomFormatUuid.ts} | 2 +- .../{$randomInteger.ts => _randomInteger.ts} | 2 +- .../{$randomNumber.ts => _randomNumber.ts} | 2 +- .../{$randomPattern.ts => _randomPattern.ts} | 2 +- src/internal/_randomPick.ts | 9 + .../{$randomString.ts => _randomString.ts} | 8 +- ...eGuardError.ts => _throwTypeGuardError.ts} | 2 +- ...{$validateReport.ts => _validateReport.ts} | 2 +- ...nCapitalize.ts => __notationCapitalize.ts} | 2 +- ...otationUnsnake.ts => __notationUnsnake.ts} | 2 +- src/programmers/AssertProgrammer.ts | 2 +- src/programmers/ImportProgrammer.ts | 4 +- src/programmers/IsProgrammer.ts | 2 +- src/programmers/RandomProgrammer.ts | 6 +- src/programmers/ValidateProgrammer.ts | 4 +- .../json/JsonStringifyProgrammer.ts | 2 +- src/programmers/misc/MiscCloneProgrammer.ts | 2 +- src/programmers/misc/MiscPruneProgrammer.ts | 2 +- .../notations/NotationGeneralProgrammer.ts | 2 +- .../protobuf/ProtobufDecodeProgrammer.ts | 2 +- .../protobuf/ProtobufEncodeProgrammer.ts | 6 +- .../features/llm/LlmApplicationTransformer.ts | 2 +- test-esm/package.json | 2 +- test/generate/output/generate_json.ts | 202 +++++----- test/generate/output/generate_misc.ts | 268 ++++++------- test/generate/output/generate_notations.ts | 370 +++++++++--------- test/generate/output/generate_plain.ts | 336 ++++++++-------- test/generate/output/generate_protobuf.ts | 164 ++++---- test/package.json | 2 +- test/src/debug/is.ts | 12 + test/src/debug/message.ts | 0 test/src/helpers/TestRandomGenerator.ts | 4 +- test/src/structures/TypeTagCustom.ts | 8 +- test/src/structures/TypeTagFormat.ts | 8 +- 120 files changed, 891 insertions(+), 879 deletions(-) delete mode 100644 src/internal/$httpParameterReadString.ts delete mode 100644 src/internal/$isBetween.ts delete mode 100644 src/internal/$notationCamel.ts delete mode 100644 src/internal/$notationPascal.ts delete mode 100644 src/internal/$randomBigint.ts delete mode 100644 src/internal/$randomBoolean.ts delete mode 100644 src/internal/$randomFormatHostname.ts delete mode 100644 src/internal/$randomFormatIdnEmail.ts delete mode 100644 src/internal/$randomFormatIdnHostname.ts delete mode 100644 src/internal/$randomFormatIri.ts delete mode 100644 src/internal/$randomFormatIriReference.ts delete mode 100644 src/internal/$randomFormatJsonPointer.ts delete mode 100644 src/internal/$randomFormatPassword.ts delete mode 100644 src/internal/$randomFormatRelativeJsonPointer.ts delete mode 100644 src/internal/$randomFormatUri.ts delete mode 100644 src/internal/$randomFormatUriReference.ts delete mode 100644 src/internal/$randomFormatUriTemplate.ts delete mode 100644 src/internal/$randomPick.ts rename src/internal/{$IProtobufWriter.ts => _IProtobufWriter.ts} (91%) rename src/internal/{$ProtobufReader.ts => _ProtobufReader.ts} (99%) rename src/internal/{$ProtobufSizer.ts => _ProtobufSizer.ts} (96%) rename src/internal/{$ProtobufWriter.ts => _ProtobufWriter.ts} (92%) rename src/internal/{$accessExpressionAsString.ts => _accessExpressionAsString.ts} (91%) rename src/internal/{$assertGuard.ts => _assertGuard.ts} (91%) rename src/internal/{$functionalTypeGuardErrorFactory.ts => _functionalTypeGuardErrorFactory.ts} (58%) rename src/internal/{$httpFormDataReadArray.ts => _httpFormDataReadArray.ts} (69%) rename src/internal/{$httpFormDataReadBigint.ts => _httpFormDataReadBigint.ts} (89%) rename src/internal/{$httpFormDataReadBlob.ts => _httpFormDataReadBlob.ts} (83%) rename src/internal/{$httpFormDataReadBoolean.ts => _httpFormDataReadBoolean.ts} (90%) rename src/internal/{$httpFormDataReadFile.ts => _httpFormDataReadFile.ts} (83%) rename src/internal/{$httpFormDataReadNumber.ts => _httpFormDataReadNumber.ts} (89%) rename src/internal/{$httpFormDataReadString.ts => _httpFormDataReadString.ts} (83%) rename src/internal/{$httpHeaderReadBigint.ts => _httpHeaderReadBigint.ts} (73%) rename src/internal/{$httpHeaderReadBoolean.ts => _httpHeaderReadBoolean.ts} (68%) rename src/internal/{$httpHeaderReadNumber.ts => _httpHeaderReadNumber.ts} (74%) rename src/internal/{$httpParameterReadBigint.ts => _httpParameterReadBigint.ts} (73%) rename src/internal/{$httpParameterReadBoolean.ts => _httpParameterReadBoolean.ts} (72%) rename src/internal/{$httpParameterReadNumber.ts => _httpParameterReadNumber.ts} (74%) create mode 100644 src/internal/_httpParameterReadString.ts rename src/internal/{$httpQueryParseURLSearchParams.ts => _httpQueryParseURLSearchParams.ts} (83%) rename src/internal/{$httpQueryReadArray.ts => _httpQueryReadArray.ts} (71%) rename src/internal/{$httpQueryReadBigint.ts => _httpQueryReadBigint.ts} (87%) rename src/internal/{$httpQueryReadBoolean.ts => _httpQueryReadBoolean.ts} (89%) rename src/internal/{$httpQueryReadNumber.ts => _httpQueryReadNumber.ts} (87%) rename src/internal/{$httpQueryReadString.ts => _httpQueryReadString.ts} (74%) create mode 100644 src/internal/_isBetween.ts rename src/internal/{$isBigintString.ts => _isBigintString.ts} (57%) rename src/internal/{$jsonStringifyNumber.ts => _jsonStringifyNumber.ts} (82%) rename src/internal/{$jsonStringifyRest.ts => _jsonStringifyRest.ts} (55%) rename src/internal/{$jsonStringifyString.ts => _jsonStringifyString.ts} (95%) rename src/internal/{$jsonStringifyTail.ts => _jsonStringifyTail.ts} (54%) rename src/internal/{$llmApplicationFinalize.ts => _llmApplicationFinalize.ts} (92%) rename src/internal/{$miscCloneAny.ts => _miscCloneAny.ts} (97%) rename src/internal/{$notationAny.ts => _notationAny.ts} (94%) create mode 100644 src/internal/_notationCamel.ts create mode 100644 src/internal/_notationPascal.ts rename src/internal/{$notationSnake.ts => _notationSnake.ts} (95%) rename src/internal/{$randomArray.ts => _randomArray.ts} (81%) create mode 100644 src/internal/_randomBigint.ts create mode 100644 src/internal/_randomBoolean.ts rename src/internal/{$randomFormatByte.ts => _randomFormatByte.ts} (53%) rename src/internal/{$randomFormatDate.ts => _randomFormatDate.ts} (73%) rename src/internal/{$randomFormatDatetime.ts => _randomFormatDatetime.ts} (71%) rename src/internal/{$randomFormatDuration.ts => _randomFormatDuration.ts} (83%) rename src/internal/{$randomFormatEmail.ts => _randomFormatEmail.ts} (57%) create mode 100644 src/internal/_randomFormatHostname.ts create mode 100644 src/internal/_randomFormatIdnEmail.ts create mode 100644 src/internal/_randomFormatIdnHostname.ts rename src/internal/{$randomFormatIpv4.ts => _randomFormatIpv4.ts} (52%) rename src/internal/{$randomFormatIpv6.ts => _randomFormatIpv6.ts} (55%) create mode 100644 src/internal/_randomFormatIri.ts create mode 100644 src/internal/_randomFormatIriReference.ts create mode 100644 src/internal/_randomFormatJsonPointer.ts create mode 100644 src/internal/_randomFormatPassword.ts rename src/internal/{$randomFormatRegex.ts => _randomFormatRegex.ts} (67%) create mode 100644 src/internal/_randomFormatRelativeJsonPointer.ts rename src/internal/{$randomFormatTime.ts => _randomFormatTime.ts} (55%) create mode 100644 src/internal/_randomFormatUri.ts create mode 100644 src/internal/_randomFormatUriReference.ts create mode 100644 src/internal/_randomFormatUriTemplate.ts rename src/internal/{$randomFormatUrl.ts => _randomFormatUrl.ts} (56%) rename src/internal/{$randomFormatUuid.ts => _randomFormatUuid.ts} (79%) rename src/internal/{$randomInteger.ts => _randomInteger.ts} (95%) rename src/internal/{$randomNumber.ts => _randomNumber.ts} (97%) rename src/internal/{$randomPattern.ts => _randomPattern.ts} (77%) create mode 100644 src/internal/_randomPick.ts rename src/internal/{$randomString.ts => _randomString.ts} (68%) rename src/internal/{$throwTypeGuardError.ts => _throwTypeGuardError.ts} (60%) rename src/internal/{$validateReport.ts => _validateReport.ts} (87%) rename src/internal/private/{$__notationCapitalize.ts => __notationCapitalize.ts} (57%) rename src/internal/private/{$__notationUnsnake.ts => __notationUnsnake.ts} (95%) create mode 100644 test/src/debug/is.ts delete mode 100644 test/src/debug/message.ts diff --git a/benchmark/package.json b/benchmark/package.json index b0c0d595cf..edbdb0afcc 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -72,6 +72,6 @@ "suppress-warnings": "^1.0.2", "tstl": "^3.0.0", "uuid": "^9.0.1", - "typia": "../typia-7.0.0-dev.20241022-3.tgz" + "typia": "../typia-7.0.0-dev.20241022-4.tgz" } } \ No newline at end of file diff --git a/errors/package.json b/errors/package.json index d0395bd725..85f7d7f7df 100644 --- a/errors/package.json +++ b/errors/package.json @@ -32,6 +32,6 @@ "typescript": "^5.3.2" }, "dependencies": { - "typia": "../typia-7.0.0-dev.20241022-3.tgz" + "typia": "../typia-7.0.0-dev.20241022-4.tgz" } } \ No newline at end of file diff --git a/package.json b/package.json index d986c651f4..8c77eefdb4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typia", - "version": "7.0.0-dev.20241022-3", + "version": "7.0.0-dev.20241022-4", "description": "Superfast runtime validators with only one line", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/typescript-json/package.json b/packages/typescript-json/package.json index 0947562ac6..6a03e1143e 100644 --- a/packages/typescript-json/package.json +++ b/packages/typescript-json/package.json @@ -1,6 +1,6 @@ { "name": "typescript-json", - "version": "7.0.0-dev.20241022-3", + "version": "7.0.0-dev.20241022-4", "description": "Superfast runtime validators with only one line", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -64,7 +64,7 @@ }, "homepage": "https://typia.io", "dependencies": { - "typia": "7.0.0-dev.20241022-3" + "typia": "7.0.0-dev.20241022-4" }, "peerDependencies": { "typescript": ">=4.8.0 <5.7.0" diff --git a/src/factories/ExpressionFactory.ts b/src/factories/ExpressionFactory.ts index 236ca186fe..b5fee9998e 100644 --- a/src/factories/ExpressionFactory.ts +++ b/src/factories/ExpressionFactory.ts @@ -1,6 +1,6 @@ import ts from "typescript"; -import { $randomFormatUuid } from "../internal/$randomFormatUuid"; +import { _randomFormatUuid } from "../internal/_randomFormatUuid"; export namespace ExpressionFactory { export const number = (value: number) => @@ -134,7 +134,7 @@ export namespace ExpressionFactory { script: string, ) => { const file: ts.SourceFile = ts.createSourceFile( - `${$randomFormatUuid()}.ts`, + `${_randomFormatUuid()}.ts`, script, ts.ScriptTarget.ESNext, true, diff --git a/src/internal/$httpParameterReadString.ts b/src/internal/$httpParameterReadString.ts deleted file mode 100644 index d70bd00b8a..0000000000 --- a/src/internal/$httpParameterReadString.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const $httpParameterReadString = (value: string) => - value !== "null" ? value : null; diff --git a/src/internal/$isBetween.ts b/src/internal/$isBetween.ts deleted file mode 100644 index c77c004133..0000000000 --- a/src/internal/$isBetween.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const $isBetween = (value: number, minimum: number, maximum: number) => - minimum <= value && value <= maximum; diff --git a/src/internal/$notationCamel.ts b/src/internal/$notationCamel.ts deleted file mode 100644 index d08309acac..0000000000 --- a/src/internal/$notationCamel.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { $__notationCapitalize } from "./private/$__notationCapitalize"; -import { $__notationUnsnake } from "./private/$__notationUnsnake"; - -export const $notationCamel = $__notationUnsnake({ - plain: (str) => - str.length - ? str === str.toUpperCase() - ? str.toLocaleLowerCase() - : `${str[0]!.toLowerCase()}${str.substring(1)}` - : str, - snake: (str, i) => - i === 0 ? str.toLowerCase() : $__notationCapitalize(str.toLowerCase()), -}); diff --git a/src/internal/$notationPascal.ts b/src/internal/$notationPascal.ts deleted file mode 100644 index b56d406a61..0000000000 --- a/src/internal/$notationPascal.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { $__notationCapitalize } from "./private/$__notationCapitalize"; -import { $__notationUnsnake } from "./private/$__notationUnsnake"; - -export const $notationPascal = $__notationUnsnake({ - plain: (str) => - str.length ? `${str[0]!.toUpperCase()}${str.substring(1)}` : str, - snake: $__notationCapitalize, -}); diff --git a/src/internal/$randomBigint.ts b/src/internal/$randomBigint.ts deleted file mode 100644 index de12044e5d..0000000000 --- a/src/internal/$randomBigint.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { OpenApi } from "@samchon/openapi"; - -import { $randomInteger } from "./$randomInteger"; - -export const $randomBigint = (props: OpenApi.IJsonSchema.IInteger): bigint => - BigInt($randomInteger(props)); diff --git a/src/internal/$randomBoolean.ts b/src/internal/$randomBoolean.ts deleted file mode 100644 index a7af3eb3ad..0000000000 --- a/src/internal/$randomBoolean.ts +++ /dev/null @@ -1 +0,0 @@ -export const $randomBoolean = (): boolean => Math.random() < 0.5; diff --git a/src/internal/$randomFormatHostname.ts b/src/internal/$randomFormatHostname.ts deleted file mode 100644 index 35a1c5fbeb..0000000000 --- a/src/internal/$randomFormatHostname.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { $randomString } from "./$randomString"; - -export const $randomFormatHostname = (): string => `${random(10)}.${random(3)}`; - -const random = (length: number) => - $randomString({ type: "string", minLength: length, maxLength: length }); diff --git a/src/internal/$randomFormatIdnEmail.ts b/src/internal/$randomFormatIdnEmail.ts deleted file mode 100644 index 8d0b964dd9..0000000000 --- a/src/internal/$randomFormatIdnEmail.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { $randomFormatEmail } from "./$randomFormatEmail"; - -export const $randomFormatIdnEmail = (): string => $randomFormatEmail(); diff --git a/src/internal/$randomFormatIdnHostname.ts b/src/internal/$randomFormatIdnHostname.ts deleted file mode 100644 index 73a7786bac..0000000000 --- a/src/internal/$randomFormatIdnHostname.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { $randomFormatHostname } from "./$randomFormatHostname"; - -export const $randomFormatIdnHostname = (): string => $randomFormatHostname(); diff --git a/src/internal/$randomFormatIri.ts b/src/internal/$randomFormatIri.ts deleted file mode 100644 index f92a48cdb2..0000000000 --- a/src/internal/$randomFormatIri.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { $randomFormatUrl } from "./$randomFormatUrl"; - -export const $randomFormatIri = (): string => $randomFormatUrl(); diff --git a/src/internal/$randomFormatIriReference.ts b/src/internal/$randomFormatIriReference.ts deleted file mode 100644 index 1f74240abe..0000000000 --- a/src/internal/$randomFormatIriReference.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { $randomFormatUrl } from "./$randomFormatUrl"; - -export const $randomFormatIriReference = (): string => $randomFormatUrl(); diff --git a/src/internal/$randomFormatJsonPointer.ts b/src/internal/$randomFormatJsonPointer.ts deleted file mode 100644 index 1b97af8d09..0000000000 --- a/src/internal/$randomFormatJsonPointer.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { $randomString } from "./$randomString"; - -export const $randomFormatJsonPointer = (): string => - `/components/schemas/${random()}`; - -const random = () => - $randomString({ type: "string", minLength: 10, maxLength: 10 }); diff --git a/src/internal/$randomFormatPassword.ts b/src/internal/$randomFormatPassword.ts deleted file mode 100644 index 9d7c4c2616..0000000000 --- a/src/internal/$randomFormatPassword.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { $randomString } from "./$randomString"; - -export const $randomFormatPassword = (): string => - $randomString({ - type: "string", - minLength: 4, - maxLength: 16, - }); diff --git a/src/internal/$randomFormatRelativeJsonPointer.ts b/src/internal/$randomFormatRelativeJsonPointer.ts deleted file mode 100644 index 355beb2766..0000000000 --- a/src/internal/$randomFormatRelativeJsonPointer.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { $randomInteger } from "./$randomInteger"; - -export const $randomFormatRelativeJsonPointer = (): string => - `${$randomInteger({ - type: "integer", - minimum: 0, - maximum: 10, - })}#`; diff --git a/src/internal/$randomFormatUri.ts b/src/internal/$randomFormatUri.ts deleted file mode 100644 index 0897760f71..0000000000 --- a/src/internal/$randomFormatUri.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { $randomFormatUrl } from "./$randomFormatUrl"; - -export const $randomFormatUri = (): string => $randomFormatUrl(); diff --git a/src/internal/$randomFormatUriReference.ts b/src/internal/$randomFormatUriReference.ts deleted file mode 100644 index 8fd62906dc..0000000000 --- a/src/internal/$randomFormatUriReference.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { $randomFormatUrl } from "./$randomFormatUrl"; - -export const $randomFormatUriReference = (): string => $randomFormatUrl(); diff --git a/src/internal/$randomFormatUriTemplate.ts b/src/internal/$randomFormatUriTemplate.ts deleted file mode 100644 index 542e0ab373..0000000000 --- a/src/internal/$randomFormatUriTemplate.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { $randomFormatUrl } from "./$randomFormatUrl"; - -export const $randomFormatUriTemplate = (): string => $randomFormatUrl(); diff --git a/src/internal/$randomPick.ts b/src/internal/$randomPick.ts deleted file mode 100644 index cf5d9dd8f0..0000000000 --- a/src/internal/$randomPick.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { $randomInteger } from "./$randomInteger"; - -export const $randomPick = (array: T[]): T => array[random(array)]!; -const random = (array: T[]) => - $randomInteger({ - type: "integer", - minimum: 0, - maximum: array.length - 1, - }); diff --git a/src/internal/$IProtobufWriter.ts b/src/internal/_IProtobufWriter.ts similarity index 91% rename from src/internal/$IProtobufWriter.ts rename to src/internal/_IProtobufWriter.ts index c79ab188f2..3e61581859 100644 --- a/src/internal/$IProtobufWriter.ts +++ b/src/internal/_IProtobufWriter.ts @@ -1,4 +1,4 @@ -export interface $IProtobufWriter { +export interface _IProtobufWriter { bool(value: boolean): void; int32(value: number): void; sint32(value: number): void; diff --git a/src/internal/$ProtobufReader.ts b/src/internal/_ProtobufReader.ts similarity index 99% rename from src/internal/$ProtobufReader.ts rename to src/internal/_ProtobufReader.ts index fee1014195..5622bbde99 100644 --- a/src/internal/$ProtobufReader.ts +++ b/src/internal/_ProtobufReader.ts @@ -3,7 +3,7 @@ import { ProtobufWire } from "../programmers/helpers/ProtobufWire"; import { Singleton } from "../utils/Singleton"; /// @reference https://github.com/piotr-oles/as-proto/blob/main/packages/as-proto/assembly/internal/FixedReader.ts -export class $ProtobufReader { +export class _ProtobufReader { /** * Read buffer */ diff --git a/src/internal/$ProtobufSizer.ts b/src/internal/_ProtobufSizer.ts similarity index 96% rename from src/internal/$ProtobufSizer.ts rename to src/internal/_ProtobufSizer.ts index 350005e812..1a4c914734 100644 --- a/src/internal/$ProtobufSizer.ts +++ b/src/internal/_ProtobufSizer.ts @@ -1,7 +1,7 @@ -import { $IProtobufWriter } from "./$IProtobufWriter"; +import { _IProtobufWriter } from "./_IProtobufWriter"; /// @reference https://github.com/piotr-oles/as-proto/blob/main/packages/as-proto/assembly/internal/FixedSizer.ts -export class $ProtobufSizer implements $IProtobufWriter { +export class _ProtobufSizer implements _IProtobufWriter { /** * Total length. */ diff --git a/src/internal/$ProtobufWriter.ts b/src/internal/_ProtobufWriter.ts similarity index 92% rename from src/internal/$ProtobufWriter.ts rename to src/internal/_ProtobufWriter.ts index c4093e4ae2..c7f2284926 100644 --- a/src/internal/$ProtobufWriter.ts +++ b/src/internal/_ProtobufWriter.ts @@ -1,14 +1,14 @@ import { Singleton } from "../utils/Singleton"; -import { $IProtobufWriter } from "./$IProtobufWriter"; -import { $ProtobufSizer } from "./$ProtobufSizer"; +import { _IProtobufWriter } from "./_IProtobufWriter"; +import { _ProtobufSizer } from "./_ProtobufSizer"; /// @reference https://github.com/piotr-oles/as-proto/blob/main/packages/as-proto/assembly/internal/FixedWriter.ts -export class $ProtobufWriter implements $IProtobufWriter { +export class _ProtobufWriter implements _IProtobufWriter { /** * Related sizer */ - private readonly sizer: $ProtobufSizer; + private readonly sizer: _ProtobufSizer; /** * Current pointer. @@ -30,7 +30,7 @@ export class $ProtobufWriter implements $IProtobufWriter { */ private varlenidx: number; - constructor(sizer: $ProtobufSizer) { + constructor(sizer: _ProtobufSizer) { this.sizer = sizer; this.buf = new Uint8Array(sizer.len); this.view = new DataView(this.buf.buffer); diff --git a/src/internal/$accessExpressionAsString.ts b/src/internal/_accessExpressionAsString.ts similarity index 91% rename from src/internal/$accessExpressionAsString.ts rename to src/internal/_accessExpressionAsString.ts index 1873cb3850..8ffe398c7f 100644 --- a/src/internal/$accessExpressionAsString.ts +++ b/src/internal/_accessExpressionAsString.ts @@ -1,4 +1,4 @@ -export const $accessExpressionAsString = (str: string): string => +export const _accessExpressionAsString = (str: string): string => variable(str) ? `.${str}` : `[${JSON.stringify(str)}]`; const variable = (str: string): boolean => diff --git a/src/internal/$assertGuard.ts b/src/internal/_assertGuard.ts similarity index 91% rename from src/internal/$assertGuard.ts rename to src/internal/_assertGuard.ts index 55d9ba17cd..6625b6b00d 100644 --- a/src/internal/$assertGuard.ts +++ b/src/internal/_assertGuard.ts @@ -1,6 +1,6 @@ import { TypeGuardError } from "../TypeGuardError"; -export const $assertGuard = ( +export const _assertGuard = ( exceptionable: boolean, props: TypeGuardError.IProps, factory?: (props: TypeGuardError.IProps) => Error, diff --git a/src/internal/$functionalTypeGuardErrorFactory.ts b/src/internal/_functionalTypeGuardErrorFactory.ts similarity index 58% rename from src/internal/$functionalTypeGuardErrorFactory.ts rename to src/internal/_functionalTypeGuardErrorFactory.ts index 48a77130aa..bdd59b0cbb 100644 --- a/src/internal/$functionalTypeGuardErrorFactory.ts +++ b/src/internal/_functionalTypeGuardErrorFactory.ts @@ -1,4 +1,4 @@ import { TypeGuardError } from "../TypeGuardError"; -export const $functionalTypeGuardErrorFactory = (p: TypeGuardError.IProps) => +export const _functionalTypeGuardErrorFactory = (p: TypeGuardError.IProps) => new TypeGuardError(p); diff --git a/src/internal/$httpFormDataReadArray.ts b/src/internal/_httpFormDataReadArray.ts similarity index 69% rename from src/internal/$httpFormDataReadArray.ts rename to src/internal/_httpFormDataReadArray.ts index a41550a5be..3f416c9b55 100644 --- a/src/internal/$httpFormDataReadArray.ts +++ b/src/internal/_httpFormDataReadArray.ts @@ -1,4 +1,4 @@ -export const $httpFormDataReadArray = ( +export const _httpFormDataReadArray = ( input: any[], alternative: null | undefined, ) => (input.length ? input : alternative); diff --git a/src/internal/$httpFormDataReadBigint.ts b/src/internal/_httpFormDataReadBigint.ts similarity index 89% rename from src/internal/$httpFormDataReadBigint.ts rename to src/internal/_httpFormDataReadBigint.ts index 6abd554582..55e7ad3294 100644 --- a/src/internal/$httpFormDataReadBigint.ts +++ b/src/internal/_httpFormDataReadBigint.ts @@ -1,4 +1,4 @@ -export const $httpFormDataReadBigint = ( +export const _httpFormDataReadBigint = ( input: string | File | null, ): bigint | null | undefined => input instanceof File diff --git a/src/internal/$httpFormDataReadBlob.ts b/src/internal/_httpFormDataReadBlob.ts similarity index 83% rename from src/internal/$httpFormDataReadBlob.ts rename to src/internal/_httpFormDataReadBlob.ts index feb4e64616..3957f5c7e5 100644 --- a/src/internal/$httpFormDataReadBlob.ts +++ b/src/internal/_httpFormDataReadBlob.ts @@ -1,4 +1,4 @@ -export const $httpFormDataReadBlob = ( +export const _httpFormDataReadBlob = ( input: string | Blob | null, ): Blob | null | undefined => input instanceof Blob diff --git a/src/internal/$httpFormDataReadBoolean.ts b/src/internal/_httpFormDataReadBoolean.ts similarity index 90% rename from src/internal/$httpFormDataReadBoolean.ts rename to src/internal/_httpFormDataReadBoolean.ts index 9f8e239166..964f5cdf10 100644 --- a/src/internal/$httpFormDataReadBoolean.ts +++ b/src/internal/_httpFormDataReadBoolean.ts @@ -1,4 +1,4 @@ -export const $httpFormDataReadBoolean = ( +export const _httpFormDataReadBoolean = ( input: string | File | null, ): boolean | null | undefined => input instanceof File diff --git a/src/internal/$httpFormDataReadFile.ts b/src/internal/_httpFormDataReadFile.ts similarity index 83% rename from src/internal/$httpFormDataReadFile.ts rename to src/internal/_httpFormDataReadFile.ts index b06877cdc6..540134b356 100644 --- a/src/internal/$httpFormDataReadFile.ts +++ b/src/internal/_httpFormDataReadFile.ts @@ -1,4 +1,4 @@ -export const $httpFormDataReadFile = ( +export const _httpFormDataReadFile = ( input: string | File | null, ): File | null | undefined => input instanceof File diff --git a/src/internal/$httpFormDataReadNumber.ts b/src/internal/_httpFormDataReadNumber.ts similarity index 89% rename from src/internal/$httpFormDataReadNumber.ts rename to src/internal/_httpFormDataReadNumber.ts index 2387660473..b0c0ac1f11 100644 --- a/src/internal/$httpFormDataReadNumber.ts +++ b/src/internal/_httpFormDataReadNumber.ts @@ -1,4 +1,4 @@ -export const $httpFormDataReadNumber = ( +export const _httpFormDataReadNumber = ( input: string | File | null, ): number | null | undefined => input instanceof File diff --git a/src/internal/$httpFormDataReadString.ts b/src/internal/_httpFormDataReadString.ts similarity index 83% rename from src/internal/$httpFormDataReadString.ts rename to src/internal/_httpFormDataReadString.ts index f7287c3f02..3f62cb5f82 100644 --- a/src/internal/$httpFormDataReadString.ts +++ b/src/internal/_httpFormDataReadString.ts @@ -1,4 +1,4 @@ -export const $httpFormDataReadString = ( +export const _httpFormDataReadString = ( input: string | File | null, ): string | null | undefined => input instanceof File diff --git a/src/internal/$httpHeaderReadBigint.ts b/src/internal/_httpHeaderReadBigint.ts similarity index 73% rename from src/internal/$httpHeaderReadBigint.ts rename to src/internal/_httpHeaderReadBigint.ts index d49ac012c6..cbf7d333cd 100644 --- a/src/internal/$httpHeaderReadBigint.ts +++ b/src/internal/_httpHeaderReadBigint.ts @@ -1,4 +1,4 @@ -export const $httpHeaderReadBigint = (value: string | undefined) => +export const _httpHeaderReadBigint = (value: string | undefined) => value !== undefined ? toBigint(value) : undefined; const toBigint = (str: string): bigint | string => { diff --git a/src/internal/$httpHeaderReadBoolean.ts b/src/internal/_httpHeaderReadBoolean.ts similarity index 68% rename from src/internal/$httpHeaderReadBoolean.ts rename to src/internal/_httpHeaderReadBoolean.ts index b97b96eb49..0e84694466 100644 --- a/src/internal/$httpHeaderReadBoolean.ts +++ b/src/internal/_httpHeaderReadBoolean.ts @@ -1,4 +1,4 @@ -export const $httpHeaderReadBoolean = (value: string | undefined) => +export const _httpHeaderReadBoolean = (value: string | undefined) => value !== undefined ? value === "true" ? true diff --git a/src/internal/$httpHeaderReadNumber.ts b/src/internal/_httpHeaderReadNumber.ts similarity index 74% rename from src/internal/$httpHeaderReadNumber.ts rename to src/internal/_httpHeaderReadNumber.ts index 35c7946d60..55a285213e 100644 --- a/src/internal/$httpHeaderReadNumber.ts +++ b/src/internal/_httpHeaderReadNumber.ts @@ -1,4 +1,4 @@ -export const $httpHeaderReadNumber = (value: string | undefined) => +export const _httpHeaderReadNumber = (value: string | undefined) => value !== undefined ? toNumber(value) : undefined; const toNumber = (str: string): number | string => { diff --git a/src/internal/$httpParameterReadBigint.ts b/src/internal/_httpParameterReadBigint.ts similarity index 73% rename from src/internal/$httpParameterReadBigint.ts rename to src/internal/_httpParameterReadBigint.ts index 64de7a166a..f494841b04 100644 --- a/src/internal/$httpParameterReadBigint.ts +++ b/src/internal/_httpParameterReadBigint.ts @@ -1,4 +1,4 @@ -export const $httpParameterReadBigint = (value: string) => +export const _httpParameterReadBigint = (value: string) => value !== "null" ? toBigint(value) : null; const toBigint = (str: string): bigint | string => { diff --git a/src/internal/$httpParameterReadBoolean.ts b/src/internal/_httpParameterReadBoolean.ts similarity index 72% rename from src/internal/$httpParameterReadBoolean.ts rename to src/internal/_httpParameterReadBoolean.ts index 709c5ba886..71abc97c1a 100644 --- a/src/internal/$httpParameterReadBoolean.ts +++ b/src/internal/_httpParameterReadBoolean.ts @@ -1,4 +1,4 @@ -export const $httpParameterReadBoolean = (value: string) => +export const _httpParameterReadBoolean = (value: string) => value !== "null" ? value === "true" || value === "1" ? true diff --git a/src/internal/$httpParameterReadNumber.ts b/src/internal/_httpParameterReadNumber.ts similarity index 74% rename from src/internal/$httpParameterReadNumber.ts rename to src/internal/_httpParameterReadNumber.ts index 82996a45db..3981876bf1 100644 --- a/src/internal/$httpParameterReadNumber.ts +++ b/src/internal/_httpParameterReadNumber.ts @@ -1,4 +1,4 @@ -export const $httpParameterReadNumber = (value: string) => +export const _httpParameterReadNumber = (value: string) => value !== "null" ? toNumber(value) : null; const toNumber = (str: string): number | string => { diff --git a/src/internal/_httpParameterReadString.ts b/src/internal/_httpParameterReadString.ts new file mode 100644 index 0000000000..55e07622fd --- /dev/null +++ b/src/internal/_httpParameterReadString.ts @@ -0,0 +1,2 @@ +export const _httpParameterReadString = (value: string) => + value !== "null" ? value : null; diff --git a/src/internal/$httpQueryParseURLSearchParams.ts b/src/internal/_httpQueryParseURLSearchParams.ts similarity index 83% rename from src/internal/$httpQueryParseURLSearchParams.ts rename to src/internal/_httpQueryParseURLSearchParams.ts index f9f56e3c40..baae2620e0 100644 --- a/src/internal/$httpQueryParseURLSearchParams.ts +++ b/src/internal/_httpQueryParseURLSearchParams.ts @@ -1,4 +1,4 @@ -export const $httpQueryParseURLSearchParams = ( +export const _httpQueryParseURLSearchParams = ( input: string | URLSearchParams, ) => { if (typeof input === "string") { diff --git a/src/internal/$httpQueryReadArray.ts b/src/internal/_httpQueryReadArray.ts similarity index 71% rename from src/internal/$httpQueryReadArray.ts rename to src/internal/_httpQueryReadArray.ts index 9dd38830fc..0904fe15e0 100644 --- a/src/internal/$httpQueryReadArray.ts +++ b/src/internal/_httpQueryReadArray.ts @@ -1,4 +1,4 @@ -export const $httpQueryReadArray = ( +export const _httpQueryReadArray = ( input: any[], alternative: null | undefined, ) => (input.length ? input : alternative); diff --git a/src/internal/$httpQueryReadBigint.ts b/src/internal/_httpQueryReadBigint.ts similarity index 87% rename from src/internal/$httpQueryReadBigint.ts rename to src/internal/_httpQueryReadBigint.ts index 0b78db9e75..15ee63b296 100644 --- a/src/internal/$httpQueryReadBigint.ts +++ b/src/internal/_httpQueryReadBigint.ts @@ -1,4 +1,4 @@ -export const $httpQueryReadBigint = ( +export const _httpQueryReadBigint = ( str: string | null, ): bigint | null | undefined => !!str?.length ? (str === "null" ? null : (toBigint(str) as any)) : undefined; diff --git a/src/internal/$httpQueryReadBoolean.ts b/src/internal/_httpQueryReadBoolean.ts similarity index 89% rename from src/internal/$httpQueryReadBoolean.ts rename to src/internal/_httpQueryReadBoolean.ts index 6cd62bf3df..e8cd40c1e8 100644 --- a/src/internal/$httpQueryReadBoolean.ts +++ b/src/internal/_httpQueryReadBoolean.ts @@ -1,4 +1,4 @@ -export const $httpQueryReadBoolean = ( +export const _httpQueryReadBoolean = ( str: string | null, ): boolean | null | undefined => str === null diff --git a/src/internal/$httpQueryReadNumber.ts b/src/internal/_httpQueryReadNumber.ts similarity index 87% rename from src/internal/$httpQueryReadNumber.ts rename to src/internal/_httpQueryReadNumber.ts index 2d7df91bdd..248056bb3d 100644 --- a/src/internal/$httpQueryReadNumber.ts +++ b/src/internal/_httpQueryReadNumber.ts @@ -1,4 +1,4 @@ -export const $httpQueryReadNumber = ( +export const _httpQueryReadNumber = ( str: string | null, ): number | null | undefined => !!str?.length ? (str === "null" ? null : (toNumber(str) as any)) : undefined; diff --git a/src/internal/$httpQueryReadString.ts b/src/internal/_httpQueryReadString.ts similarity index 74% rename from src/internal/$httpQueryReadString.ts rename to src/internal/_httpQueryReadString.ts index 20bdccdeab..175bcf9a86 100644 --- a/src/internal/$httpQueryReadString.ts +++ b/src/internal/_httpQueryReadString.ts @@ -1,4 +1,4 @@ -export const $httpQueryReadString = ( +export const _httpQueryReadString = ( str: string | null, ): string | null | undefined => str === null ? undefined : str === "null" ? null : str; diff --git a/src/internal/_isBetween.ts b/src/internal/_isBetween.ts new file mode 100644 index 0000000000..ea74634a5d --- /dev/null +++ b/src/internal/_isBetween.ts @@ -0,0 +1,2 @@ +export const _isBetween = (value: number, minimum: number, maximum: number) => + minimum <= value && value <= maximum; diff --git a/src/internal/$isBigintString.ts b/src/internal/_isBigintString.ts similarity index 57% rename from src/internal/$isBigintString.ts rename to src/internal/_isBigintString.ts index 89b4f4fbb1..4db4cfd310 100644 --- a/src/internal/$isBigintString.ts +++ b/src/internal/_isBigintString.ts @@ -1,4 +1,4 @@ -export const $isBigintString = (str: string): boolean => { +export const _isBigintString = (str: string): boolean => { try { BigInt(str); return true; diff --git a/src/internal/$jsonStringifyNumber.ts b/src/internal/_jsonStringifyNumber.ts similarity index 82% rename from src/internal/$jsonStringifyNumber.ts rename to src/internal/_jsonStringifyNumber.ts index 7028472dd4..77b58721d7 100644 --- a/src/internal/$jsonStringifyNumber.ts +++ b/src/internal/_jsonStringifyNumber.ts @@ -1,6 +1,6 @@ import { TypeGuardError } from "../TypeGuardError"; -export const $jsonStringifyNumber = (value: number): number => { +export const _jsonStringifyNumber = (value: number): number => { if (isFinite(value) === false) throw new TypeGuardError({ method: "typia.json.stringify", diff --git a/src/internal/$jsonStringifyRest.ts b/src/internal/_jsonStringifyRest.ts similarity index 55% rename from src/internal/$jsonStringifyRest.ts rename to src/internal/_jsonStringifyRest.ts index 9b44cb0f59..94302a28cc 100644 --- a/src/internal/$jsonStringifyRest.ts +++ b/src/internal/_jsonStringifyRest.ts @@ -1,3 +1,3 @@ -export const $jsonStringifyRest = (str: string): string => { +export const _jsonStringifyRest = (str: string): string => { return str.length === 2 ? "" : "," + str.substring(1, str.length - 1); }; diff --git a/src/internal/$jsonStringifyString.ts b/src/internal/_jsonStringifyString.ts similarity index 95% rename from src/internal/$jsonStringifyString.ts rename to src/internal/_jsonStringifyString.ts index 3f61c65207..e747d632cb 100644 --- a/src/internal/$jsonStringifyString.ts +++ b/src/internal/_jsonStringifyString.ts @@ -10,7 +10,7 @@ * @reference https://github.com/fastify/fast-json-stringify/blob/master/lib/serializer.js * @blog https://dev.to/samchon/good-bye-typescript-is-ancestor-of-typia-20000x-faster-validator-49fi */ -export const $jsonStringifyString = (str: string): string => { +export const _jsonStringifyString = (str: string): string => { const len = str.length; let result = ""; let last = -1; diff --git a/src/internal/$jsonStringifyTail.ts b/src/internal/_jsonStringifyTail.ts similarity index 54% rename from src/internal/$jsonStringifyTail.ts rename to src/internal/_jsonStringifyTail.ts index 5638837fab..cbdabf2a2b 100644 --- a/src/internal/$jsonStringifyTail.ts +++ b/src/internal/_jsonStringifyTail.ts @@ -1,2 +1,2 @@ -export const $jsonStringifyTail = (str: string): string => +export const _jsonStringifyTail = (str: string): string => str[str.length - 1] === "," ? str.substring(0, str.length - 1) : str; diff --git a/src/internal/$llmApplicationFinalize.ts b/src/internal/_llmApplicationFinalize.ts similarity index 92% rename from src/internal/$llmApplicationFinalize.ts rename to src/internal/_llmApplicationFinalize.ts index b80985ca44..817f29624a 100644 --- a/src/internal/$llmApplicationFinalize.ts +++ b/src/internal/_llmApplicationFinalize.ts @@ -2,7 +2,7 @@ import { ILlmApplication } from "@samchon/openapi"; import { LlmSchemaSeparator } from "@samchon/openapi/lib/utils/LlmSchemaSeparator"; -export const $llmApplicationFinalize = ( +export const _llmApplicationFinalize = ( app: ILlmApplication, options?: ILlmApplication.IOptions, ): void => { diff --git a/src/internal/$miscCloneAny.ts b/src/internal/_miscCloneAny.ts similarity index 97% rename from src/internal/$miscCloneAny.ts rename to src/internal/_miscCloneAny.ts index d92fecd5af..de5c00e779 100644 --- a/src/internal/$miscCloneAny.ts +++ b/src/internal/_miscCloneAny.ts @@ -1,6 +1,6 @@ import { Resolved } from "../Resolved"; -export const $miscCloneAny = (value: T): Resolved => +export const _miscCloneAny = (value: T): Resolved => $cloneMain(value) as Resolved; const $cloneMain = (value: any): any => { diff --git a/src/internal/$notationAny.ts b/src/internal/_notationAny.ts similarity index 94% rename from src/internal/$notationAny.ts rename to src/internal/_notationAny.ts index d416c7016f..409b3972ca 100644 --- a/src/internal/$notationAny.ts +++ b/src/internal/_notationAny.ts @@ -1,4 +1,4 @@ -export const $notationAny = (rename: (str: string) => string) => { +export const _notationAny = (rename: (str: string) => string) => { const main = (input: any): any => { if (typeof input === "object") if (input === null) return null; diff --git a/src/internal/_notationCamel.ts b/src/internal/_notationCamel.ts new file mode 100644 index 0000000000..4fa301c5e9 --- /dev/null +++ b/src/internal/_notationCamel.ts @@ -0,0 +1,13 @@ +import { __notationCapitalize } from "./private/__notationCapitalize"; +import { __notationUnsnake } from "./private/__notationUnsnake"; + +export const _notationCamel = __notationUnsnake({ + plain: (str) => + str.length + ? str === str.toUpperCase() + ? str.toLocaleLowerCase() + : `${str[0]!.toLowerCase()}${str.substring(1)}` + : str, + snake: (str, i) => + i === 0 ? str.toLowerCase() : __notationCapitalize(str.toLowerCase()), +}); diff --git a/src/internal/_notationPascal.ts b/src/internal/_notationPascal.ts new file mode 100644 index 0000000000..f79c0887fa --- /dev/null +++ b/src/internal/_notationPascal.ts @@ -0,0 +1,8 @@ +import { __notationCapitalize } from "./private/__notationCapitalize"; +import { __notationUnsnake } from "./private/__notationUnsnake"; + +export const _notationPascal = __notationUnsnake({ + plain: (str) => + str.length ? `${str[0]!.toUpperCase()}${str.substring(1)}` : str, + snake: __notationCapitalize, +}); diff --git a/src/internal/$notationSnake.ts b/src/internal/_notationSnake.ts similarity index 95% rename from src/internal/$notationSnake.ts rename to src/internal/_notationSnake.ts index 919ff87e8a..ce924d5103 100644 --- a/src/internal/$notationSnake.ts +++ b/src/internal/_notationSnake.ts @@ -1,4 +1,4 @@ -export const $notationSnake = (str: string): string => { +export const _notationSnake = (str: string): string => { if (str.length === 0) return str; // PREFIX diff --git a/src/internal/$randomArray.ts b/src/internal/_randomArray.ts similarity index 81% rename from src/internal/$randomArray.ts rename to src/internal/_randomArray.ts index c2050b93b5..cc6597edc5 100644 --- a/src/internal/$randomArray.ts +++ b/src/internal/_randomArray.ts @@ -1,13 +1,13 @@ import { OpenApi } from "@samchon/openapi"; -import { $randomInteger } from "./$randomInteger"; +import { _randomInteger } from "./_randomInteger"; -export const $randomArray = ( +export const _randomArray = ( props: Omit & { element: (index: number, count: number) => T; }, ) => { - const count: number = $randomInteger({ + const count: number = _randomInteger({ type: "integer", minimum: props.minItems ?? 0, maximum: props.maxItems ?? (props.minItems ?? 0) + 5, diff --git a/src/internal/_randomBigint.ts b/src/internal/_randomBigint.ts new file mode 100644 index 0000000000..80f69c4706 --- /dev/null +++ b/src/internal/_randomBigint.ts @@ -0,0 +1,6 @@ +import { OpenApi } from "@samchon/openapi"; + +import { _randomInteger } from "./_randomInteger"; + +export const _randomBigint = (props: OpenApi.IJsonSchema.IInteger): bigint => + BigInt(_randomInteger(props)); diff --git a/src/internal/_randomBoolean.ts b/src/internal/_randomBoolean.ts new file mode 100644 index 0000000000..7d549997fe --- /dev/null +++ b/src/internal/_randomBoolean.ts @@ -0,0 +1 @@ +export const _randomBoolean = (): boolean => Math.random() < 0.5; diff --git a/src/internal/$randomFormatByte.ts b/src/internal/_randomFormatByte.ts similarity index 53% rename from src/internal/$randomFormatByte.ts rename to src/internal/_randomFormatByte.ts index 57274226ce..314fe464df 100644 --- a/src/internal/$randomFormatByte.ts +++ b/src/internal/_randomFormatByte.ts @@ -1,3 +1,3 @@ -export const $randomFormatByte = (): string => FIXED; +export const _randomFormatByte = (): string => FIXED; const FIXED = "vt7ekz4lIoNTTS9sDQYdWKharxIFAR54+z/umIxSgUM="; diff --git a/src/internal/$randomFormatDate.ts b/src/internal/_randomFormatDate.ts similarity index 73% rename from src/internal/$randomFormatDate.ts rename to src/internal/_randomFormatDate.ts index b97bf10b69..b2de9d6a60 100644 --- a/src/internal/$randomFormatDate.ts +++ b/src/internal/_randomFormatDate.ts @@ -1,11 +1,11 @@ -import { $randomInteger } from "./$randomInteger"; +import { _randomInteger } from "./_randomInteger"; -export const $randomFormatDate = (props?: { +export const _randomFormatDate = (props?: { minimum?: number; maximum?: number; }) => new Date( - $randomInteger({ + _randomInteger({ type: "integer", minimum: props?.minimum ?? 0, maximum: diff --git a/src/internal/$randomFormatDatetime.ts b/src/internal/_randomFormatDatetime.ts similarity index 71% rename from src/internal/$randomFormatDatetime.ts rename to src/internal/_randomFormatDatetime.ts index 288729d2a9..9e036f1f3f 100644 --- a/src/internal/$randomFormatDatetime.ts +++ b/src/internal/_randomFormatDatetime.ts @@ -1,11 +1,11 @@ -import { $randomInteger } from "./$randomInteger"; +import { _randomInteger } from "./_randomInteger"; -export const $randomFormatDatetime = (props?: { +export const _randomFormatDatetime = (props?: { minimum?: number; maximum?: number; }) => new Date( - $randomInteger({ + _randomInteger({ type: "integer", minimum: props?.minimum ?? 0, maximum: diff --git a/src/internal/$randomFormatDuration.ts b/src/internal/_randomFormatDuration.ts similarity index 83% rename from src/internal/$randomFormatDuration.ts rename to src/internal/_randomFormatDuration.ts index 6e17542c09..530b40f536 100644 --- a/src/internal/$randomFormatDuration.ts +++ b/src/internal/_randomFormatDuration.ts @@ -1,6 +1,6 @@ -import { $randomInteger } from "./$randomInteger"; +import { _randomInteger } from "./_randomInteger"; -export const $randomFormatDuration = (): string => { +export const _randomFormatDuration = (): string => { const period: string = durate([ ["Y", random(0, 100)], ["M", random(0, 12)], @@ -20,7 +20,7 @@ const durate = (elements: [string, number][]) => .map(([unit, value]) => `${value}${unit}`) .join(""); const random = (minimum: number, maximum: number) => - $randomInteger({ + _randomInteger({ type: "integer", minimum, maximum, diff --git a/src/internal/$randomFormatEmail.ts b/src/internal/_randomFormatEmail.ts similarity index 57% rename from src/internal/$randomFormatEmail.ts rename to src/internal/_randomFormatEmail.ts index e261d1de0c..8ae3a608ae 100644 --- a/src/internal/$randomFormatEmail.ts +++ b/src/internal/_randomFormatEmail.ts @@ -1,10 +1,10 @@ -import { $randomString } from "./$randomString"; +import { _randomString } from "./_randomString"; -export const $randomFormatEmail = (): string => +export const _randomFormatEmail = (): string => `${random(10)}@${random(10)}.${random(3)}`; const random = (length: number) => - $randomString({ + _randomString({ type: "string", minLength: length, maxLength: length, diff --git a/src/internal/_randomFormatHostname.ts b/src/internal/_randomFormatHostname.ts new file mode 100644 index 0000000000..3e475f347d --- /dev/null +++ b/src/internal/_randomFormatHostname.ts @@ -0,0 +1,6 @@ +import { _randomString } from "./_randomString"; + +export const _randomFormatHostname = (): string => `${random(10)}.${random(3)}`; + +const random = (length: number) => + _randomString({ type: "string", minLength: length, maxLength: length }); diff --git a/src/internal/_randomFormatIdnEmail.ts b/src/internal/_randomFormatIdnEmail.ts new file mode 100644 index 0000000000..21dfef7eb3 --- /dev/null +++ b/src/internal/_randomFormatIdnEmail.ts @@ -0,0 +1,3 @@ +import { _randomFormatEmail } from "./_randomFormatEmail"; + +export const _randomFormatIdnEmail = (): string => _randomFormatEmail(); diff --git a/src/internal/_randomFormatIdnHostname.ts b/src/internal/_randomFormatIdnHostname.ts new file mode 100644 index 0000000000..6fe2b669d9 --- /dev/null +++ b/src/internal/_randomFormatIdnHostname.ts @@ -0,0 +1,3 @@ +import { _randomFormatHostname } from "./_randomFormatHostname"; + +export const _randomFormatIdnHostname = (): string => _randomFormatHostname(); diff --git a/src/internal/$randomFormatIpv4.ts b/src/internal/_randomFormatIpv4.ts similarity index 52% rename from src/internal/$randomFormatIpv4.ts rename to src/internal/_randomFormatIpv4.ts index b8a2beb47b..a855b5366a 100644 --- a/src/internal/$randomFormatIpv4.ts +++ b/src/internal/_randomFormatIpv4.ts @@ -1,10 +1,10 @@ -import { $randomInteger } from "./$randomInteger"; +import { _randomInteger } from "./_randomInteger"; -export const $randomFormatIpv4 = (): string => +export const _randomFormatIpv4 = (): string => new Array(4).fill(0).map(random).join("."); const random = () => - $randomInteger({ + _randomInteger({ type: "integer", minimum: 0, maximum: 255, diff --git a/src/internal/$randomFormatIpv6.ts b/src/internal/_randomFormatIpv6.ts similarity index 55% rename from src/internal/$randomFormatIpv6.ts rename to src/internal/_randomFormatIpv6.ts index d570b1463d..6c3009465e 100644 --- a/src/internal/$randomFormatIpv6.ts +++ b/src/internal/_randomFormatIpv6.ts @@ -1,10 +1,10 @@ -import { $randomInteger } from "./$randomInteger"; +import { _randomInteger } from "./_randomInteger"; -export const $randomFormatIpv6 = (): string => +export const _randomFormatIpv6 = (): string => new Array(8).fill(0).map(random).join(":"); const random = () => - $randomInteger({ + _randomInteger({ type: "integer", minimum: 0, maximum: 65_535, diff --git a/src/internal/_randomFormatIri.ts b/src/internal/_randomFormatIri.ts new file mode 100644 index 0000000000..212931a75e --- /dev/null +++ b/src/internal/_randomFormatIri.ts @@ -0,0 +1,3 @@ +import { _randomFormatUrl } from "./_randomFormatUrl"; + +export const _randomFormatIri = (): string => _randomFormatUrl(); diff --git a/src/internal/_randomFormatIriReference.ts b/src/internal/_randomFormatIriReference.ts new file mode 100644 index 0000000000..bea74bf5ba --- /dev/null +++ b/src/internal/_randomFormatIriReference.ts @@ -0,0 +1,3 @@ +import { _randomFormatUrl } from "./_randomFormatUrl"; + +export const _randomFormatIriReference = (): string => _randomFormatUrl(); diff --git a/src/internal/_randomFormatJsonPointer.ts b/src/internal/_randomFormatJsonPointer.ts new file mode 100644 index 0000000000..1fd251f438 --- /dev/null +++ b/src/internal/_randomFormatJsonPointer.ts @@ -0,0 +1,7 @@ +import { _randomString } from "./_randomString"; + +export const _randomFormatJsonPointer = (): string => + `/components/schemas/${random()}`; + +const random = () => + _randomString({ type: "string", minLength: 10, maxLength: 10 }); diff --git a/src/internal/_randomFormatPassword.ts b/src/internal/_randomFormatPassword.ts new file mode 100644 index 0000000000..17dbf8d8d5 --- /dev/null +++ b/src/internal/_randomFormatPassword.ts @@ -0,0 +1,8 @@ +import { _randomString } from "./_randomString"; + +export const _randomFormatPassword = (): string => + _randomString({ + type: "string", + minLength: 4, + maxLength: 16, + }); diff --git a/src/internal/$randomFormatRegex.ts b/src/internal/_randomFormatRegex.ts similarity index 67% rename from src/internal/$randomFormatRegex.ts rename to src/internal/_randomFormatRegex.ts index d5f047b30e..fa58962821 100644 --- a/src/internal/$randomFormatRegex.ts +++ b/src/internal/_randomFormatRegex.ts @@ -1,4 +1,4 @@ -export const $randomFormatRegex = (): string => FIXED; +export const _randomFormatRegex = (): string => FIXED; const FIXED = "/^(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)$/"; diff --git a/src/internal/_randomFormatRelativeJsonPointer.ts b/src/internal/_randomFormatRelativeJsonPointer.ts new file mode 100644 index 0000000000..46cfbe446d --- /dev/null +++ b/src/internal/_randomFormatRelativeJsonPointer.ts @@ -0,0 +1,8 @@ +import { _randomInteger } from "./_randomInteger"; + +export const _randomFormatRelativeJsonPointer = (): string => + `${_randomInteger({ + type: "integer", + minimum: 0, + maximum: 10, + })}#`; diff --git a/src/internal/$randomFormatTime.ts b/src/internal/_randomFormatTime.ts similarity index 55% rename from src/internal/$randomFormatTime.ts rename to src/internal/_randomFormatTime.ts index 14ea5aba8e..80d80798e8 100644 --- a/src/internal/$randomFormatTime.ts +++ b/src/internal/_randomFormatTime.ts @@ -1,8 +1,8 @@ -import { $randomInteger } from "./$randomInteger"; +import { _randomInteger } from "./_randomInteger"; -export const $randomFormatTime = (): string => +export const _randomFormatTime = (): string => new Date( - $randomInteger({ + _randomInteger({ type: "integer", minimum: 0, maximum: DAY, diff --git a/src/internal/_randomFormatUri.ts b/src/internal/_randomFormatUri.ts new file mode 100644 index 0000000000..4c7959eb44 --- /dev/null +++ b/src/internal/_randomFormatUri.ts @@ -0,0 +1,3 @@ +import { _randomFormatUrl } from "./_randomFormatUrl"; + +export const _randomFormatUri = (): string => _randomFormatUrl(); diff --git a/src/internal/_randomFormatUriReference.ts b/src/internal/_randomFormatUriReference.ts new file mode 100644 index 0000000000..a4a27ed42c --- /dev/null +++ b/src/internal/_randomFormatUriReference.ts @@ -0,0 +1,3 @@ +import { _randomFormatUrl } from "./_randomFormatUrl"; + +export const _randomFormatUriReference = (): string => _randomFormatUrl(); diff --git a/src/internal/_randomFormatUriTemplate.ts b/src/internal/_randomFormatUriTemplate.ts new file mode 100644 index 0000000000..8976ddc58d --- /dev/null +++ b/src/internal/_randomFormatUriTemplate.ts @@ -0,0 +1,3 @@ +import { _randomFormatUrl } from "./_randomFormatUrl"; + +export const _randomFormatUriTemplate = (): string => _randomFormatUrl(); diff --git a/src/internal/$randomFormatUrl.ts b/src/internal/_randomFormatUrl.ts similarity index 56% rename from src/internal/$randomFormatUrl.ts rename to src/internal/_randomFormatUrl.ts index fddbbcdc7c..870042205a 100644 --- a/src/internal/$randomFormatUrl.ts +++ b/src/internal/_randomFormatUrl.ts @@ -1,10 +1,10 @@ -import { $randomString } from "./$randomString"; +import { _randomString } from "./_randomString"; -export const $randomFormatUrl = (): string => +export const _randomFormatUrl = (): string => `https://${random(10)}.${random(3)}`; const random = (length: number) => - $randomString({ + _randomString({ type: "string", minLength: length, maxLength: length, diff --git a/src/internal/$randomFormatUuid.ts b/src/internal/_randomFormatUuid.ts similarity index 79% rename from src/internal/$randomFormatUuid.ts rename to src/internal/_randomFormatUuid.ts index 16b52e7727..5d8655d38c 100644 --- a/src/internal/$randomFormatUuid.ts +++ b/src/internal/_randomFormatUuid.ts @@ -1,4 +1,4 @@ -export const $randomFormatUuid = (): string => +export const _randomFormatUuid = (): string => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => { const r = (Math.random() * 16) | 0; const v = c === "x" ? r : (r & 0x3) | 0x8; diff --git a/src/internal/$randomInteger.ts b/src/internal/_randomInteger.ts similarity index 95% rename from src/internal/$randomInteger.ts rename to src/internal/_randomInteger.ts index f650744350..af68eee279 100644 --- a/src/internal/$randomInteger.ts +++ b/src/internal/_randomInteger.ts @@ -1,6 +1,6 @@ import { OpenApi } from "@samchon/openapi"; -export const $randomInteger = (props: OpenApi.IJsonSchema.IInteger) => { +export const _randomInteger = (props: OpenApi.IJsonSchema.IInteger) => { let minimum: number = props.minimum ?? (props.multipleOf ?? 1) * diff --git a/src/internal/$randomNumber.ts b/src/internal/_randomNumber.ts similarity index 97% rename from src/internal/$randomNumber.ts rename to src/internal/_randomNumber.ts index 81565f860d..75b3a792aa 100644 --- a/src/internal/$randomNumber.ts +++ b/src/internal/_randomNumber.ts @@ -1,6 +1,6 @@ import { OpenApi } from "@samchon/openapi"; -export const $randomNumber = (schema: OpenApi.IJsonSchema.INumber): number => { +export const _randomNumber = (schema: OpenApi.IJsonSchema.INumber): number => { const minimum: number = schema.minimum ?? (schema.multipleOf ?? 1) * diff --git a/src/internal/$randomPattern.ts b/src/internal/_randomPattern.ts similarity index 77% rename from src/internal/$randomPattern.ts rename to src/internal/_randomPattern.ts index 0002dcdcfa..0355ca7f56 100644 --- a/src/internal/$randomPattern.ts +++ b/src/internal/_randomPattern.ts @@ -1,6 +1,6 @@ import RandExp from "randexp"; -export const $randomPattern = (regex: RegExp): string => { +export const _randomPattern = (regex: RegExp): string => { const r: RandExp = new RandExp(regex); for (let i: number = 0; i < 10; ++i) { const str: string = r.gen(); diff --git a/src/internal/_randomPick.ts b/src/internal/_randomPick.ts new file mode 100644 index 0000000000..497eb46d0c --- /dev/null +++ b/src/internal/_randomPick.ts @@ -0,0 +1,9 @@ +import { _randomInteger } from "./_randomInteger"; + +export const _randomPick = (array: T[]): T => array[random(array)]!; +const random = (array: T[]) => + _randomInteger({ + type: "integer", + minimum: 0, + maximum: array.length - 1, + }); diff --git a/src/internal/$randomString.ts b/src/internal/_randomString.ts similarity index 68% rename from src/internal/$randomString.ts rename to src/internal/_randomString.ts index 8cda9183a9..e87176c326 100644 --- a/src/internal/$randomString.ts +++ b/src/internal/_randomString.ts @@ -1,9 +1,9 @@ import { OpenApi } from "@samchon/openapi"; -import { $randomInteger } from "./$randomInteger"; +import { _randomInteger } from "./_randomInteger"; -export const $randomString = (props: OpenApi.IJsonSchema.IString) => { - const length: number = $randomInteger({ +export const _randomString = (props: OpenApi.IJsonSchema.IString) => { + const length: number = _randomInteger({ type: "integer", minimum: props.minLength ?? 0, maximum: props.maxLength, @@ -17,7 +17,7 @@ export const $randomString = (props: OpenApi.IJsonSchema.IString) => { const ALPHABETS = "abcdefghijklmnopqrstuvwxyz"; const random = () => - $randomInteger({ + _randomInteger({ type: "integer", minimum: 0, maximum: ALPHABETS.length - 1, diff --git a/src/internal/$throwTypeGuardError.ts b/src/internal/_throwTypeGuardError.ts similarity index 60% rename from src/internal/$throwTypeGuardError.ts rename to src/internal/_throwTypeGuardError.ts index fd9c3dee27..3785b93058 100644 --- a/src/internal/$throwTypeGuardError.ts +++ b/src/internal/_throwTypeGuardError.ts @@ -1,5 +1,5 @@ import { TypeGuardError } from "../TypeGuardError"; -export const $throwTypeGuardError = (props: TypeGuardError.IProps) => { +export const _throwTypeGuardError = (props: TypeGuardError.IProps) => { throw new TypeGuardError(props); }; diff --git a/src/internal/$validateReport.ts b/src/internal/_validateReport.ts similarity index 87% rename from src/internal/$validateReport.ts rename to src/internal/_validateReport.ts index fc921854d7..c25b2e6a37 100644 --- a/src/internal/$validateReport.ts +++ b/src/internal/_validateReport.ts @@ -1,6 +1,6 @@ import { IValidation } from "../IValidation"; -export const $validateReport = (array: IValidation.IError[]) => { +export const _validateReport = (array: IValidation.IError[]) => { const reportable = (path: string): boolean => { if (array.length === 0) return true; const last: string = array[array.length - 1]!.path; diff --git a/src/internal/private/$__notationCapitalize.ts b/src/internal/private/__notationCapitalize.ts similarity index 57% rename from src/internal/private/$__notationCapitalize.ts rename to src/internal/private/__notationCapitalize.ts index 9c0744b807..c6c88a6a35 100644 --- a/src/internal/private/$__notationCapitalize.ts +++ b/src/internal/private/__notationCapitalize.ts @@ -1,2 +1,2 @@ -export const $__notationCapitalize = (str: string) => +export const __notationCapitalize = (str: string) => str.length ? str[0]!.toUpperCase() + str.slice(1).toLowerCase() : str; diff --git a/src/internal/private/$__notationUnsnake.ts b/src/internal/private/__notationUnsnake.ts similarity index 95% rename from src/internal/private/$__notationUnsnake.ts rename to src/internal/private/__notationUnsnake.ts index 50b4b392e2..bc0aa01acf 100644 --- a/src/internal/private/$__notationUnsnake.ts +++ b/src/internal/private/__notationUnsnake.ts @@ -1,4 +1,4 @@ -export const $__notationUnsnake = +export const __notationUnsnake = (props: { plain: (str: string) => string; snake: (str: string, index: number) => string; diff --git a/src/programmers/AssertProgrammer.ts b/src/programmers/AssertProgrammer.ts index 8c8c7621d1..51bdb6adda 100644 --- a/src/programmers/AssertProgrammer.ts +++ b/src/programmers/AssertProgrammer.ts @@ -41,7 +41,7 @@ export namespace AssertProgrammer { const composed: FeatureProgrammer.IComposed = CheckerProgrammer.compose({ ...props, config: { - prefix: "$a", + prefix: "_a", path: true, trace: true, numeric: OptionPredicator.numeric(props.context.options), diff --git a/src/programmers/ImportProgrammer.ts b/src/programmers/ImportProgrammer.ts index 57e2a45aa2..6729f3b6dd 100644 --- a/src/programmers/ImportProgrammer.ts +++ b/src/programmers/ImportProgrammer.ts @@ -62,7 +62,7 @@ export class ImportProgrammer { * @internal */ public internal(name: string): ts.PropertyAccessExpression { - if (name.startsWith("$") === false) name = `$${name}`; + if (name.startsWith("_") === false) name = `_${name}`; return ts.factory.createPropertyAccessExpression( this.namespace({ file: `typia/lib/internal/${name}.js`, @@ -77,7 +77,7 @@ export class ImportProgrammer { * @internal */ public getInternalText(name: string): string { - if (name.startsWith("$") === false) name = `$${name}`; + if (name.startsWith("_") === false) name = `_${name}`; const asset: IAsset | undefined = this.take( `typia/lib/internal/${name}.js`, ); diff --git a/src/programmers/IsProgrammer.ts b/src/programmers/IsProgrammer.ts index c52b5703be..600d8e3c01 100644 --- a/src/programmers/IsProgrammer.ts +++ b/src/programmers/IsProgrammer.ts @@ -24,7 +24,7 @@ export namespace IsProgrammer { context: ITypiaContext; functor: FunctionProgrammer; }): CheckerProgrammer.IConfig => ({ - prefix: "$i", + prefix: "_i", equals: !!props.options?.object, trace: false, path: false, diff --git a/src/programmers/RandomProgrammer.ts b/src/programmers/RandomProgrammer.ts index 8b517d23ed..a46a9967eb 100644 --- a/src/programmers/RandomProgrammer.ts +++ b/src/programmers/RandomProgrammer.ts @@ -1184,7 +1184,7 @@ interface IExplore { } const Prefix = { - object: (i: number) => `$ro${i}`, - array: (i: number) => `$ra${i}`, - tuple: (i: number) => `$rt${i}`, + object: (i: number) => `_ro${i}`, + array: (i: number) => `_ra${i}`, + tuple: (i: number) => `_rt${i}`, }; diff --git a/src/programmers/ValidateProgrammer.ts b/src/programmers/ValidateProgrammer.ts index 41ca76410c..c359f710c1 100644 --- a/src/programmers/ValidateProgrammer.ts +++ b/src/programmers/ValidateProgrammer.ts @@ -37,7 +37,7 @@ export namespace ValidateProgrammer { const composed: FeatureProgrammer.IComposed = CheckerProgrammer.compose({ ...props, config: { - prefix: "$v", + prefix: "_v", path: true, trace: true, numeric: OptionPredicator.numeric(props.context.options), @@ -143,7 +143,7 @@ export namespace ValidateProgrammer { ts.factory.createToken(ts.SyntaxKind.EqualsToken), ts.factory.createCallExpression( ts.factory.createAsExpression( - props.context.importer.internal("$validateReport"), + props.context.importer.internal("validateReport"), TypeFactory.keyword("any"), ), [], diff --git a/src/programmers/json/JsonStringifyProgrammer.ts b/src/programmers/json/JsonStringifyProgrammer.ts index 304981bf09..d92012ee20 100644 --- a/src/programmers/json/JsonStringifyProgrammer.ts +++ b/src/programmers/json/JsonStringifyProgrammer.ts @@ -974,7 +974,7 @@ export namespace JsonStringifyProgrammer { /* ----------------------------------------------------------- CONFIGURATIONS ----------------------------------------------------------- */ - const PREFIX = "$s"; + const PREFIX = "_s"; const configure = (props: { context: ITypiaContext; diff --git a/src/programmers/misc/MiscCloneProgrammer.ts b/src/programmers/misc/MiscCloneProgrammer.ts index 335af57fe4..c5bbd67450 100644 --- a/src/programmers/misc/MiscCloneProgrammer.ts +++ b/src/programmers/misc/MiscCloneProgrammer.ts @@ -846,7 +846,7 @@ export namespace MiscCloneProgrammer { /* ----------------------------------------------------------- CONFIGURATIONS ----------------------------------------------------------- */ - const PREFIX = "$c"; + const PREFIX = "_c"; const configure = (props: { context: ITypiaContext; diff --git a/src/programmers/misc/MiscPruneProgrammer.ts b/src/programmers/misc/MiscPruneProgrammer.ts index ec00936100..a902280567 100644 --- a/src/programmers/misc/MiscPruneProgrammer.ts +++ b/src/programmers/misc/MiscPruneProgrammer.ts @@ -572,7 +572,7 @@ export namespace MiscPruneProgrammer { /* ----------------------------------------------------------- CONFIGURATIONS ----------------------------------------------------------- */ - const PREFIX = "$p"; + const PREFIX = "_p"; const configure = (props: { context: ITypiaContext; diff --git a/src/programmers/notations/NotationGeneralProgrammer.ts b/src/programmers/notations/NotationGeneralProgrammer.ts index fb7a00ae68..ec284ae7fe 100644 --- a/src/programmers/notations/NotationGeneralProgrammer.ts +++ b/src/programmers/notations/NotationGeneralProgrammer.ts @@ -801,7 +801,7 @@ export namespace NotationGeneralProgrammer { /* ----------------------------------------------------------- CONFIGURATIONS ----------------------------------------------------------- */ - const PREFIX = "$c"; + const PREFIX = "_c"; const configure = (props: { rename: (str: string) => string; diff --git a/src/programmers/protobuf/ProtobufDecodeProgrammer.ts b/src/programmers/protobuf/ProtobufDecodeProgrammer.ts index 1f321577be..6d088403a6 100644 --- a/src/programmers/protobuf/ProtobufDecodeProgrammer.ts +++ b/src/programmers/protobuf/ProtobufDecodeProgrammer.ts @@ -615,7 +615,7 @@ export namespace ProtobufDecodeProgrammer { }; } -const PREFIX = "$pd"; +const PREFIX = "_pd"; const callReader = ( method: string, args?: ts.Expression[], diff --git a/src/programmers/protobuf/ProtobufEncodeProgrammer.ts b/src/programmers/protobuf/ProtobufEncodeProgrammer.ts index 1d24908a45..a678218d74 100644 --- a/src/programmers/protobuf/ProtobufEncodeProgrammer.ts +++ b/src/programmers/protobuf/ProtobufEncodeProgrammer.ts @@ -158,8 +158,8 @@ export namespace ProtobufEncodeProgrammer { undefined, "Writer", props.context.importer.type({ - file: "typia/lib/internal/$IProtobufWriter.js", - name: "$IProtobufWriter", + file: "typia/lib/internal/_IProtobufWriter.js", + name: "_IProtobufWriter", }), ), ], @@ -882,7 +882,7 @@ export namespace ProtobufEncodeProgrammer { /* ----------------------------------------------------------- BACKGROUND FUNCTIONS ----------------------------------------------------------- */ - const PREFIX = "$pe"; + const PREFIX = "_pe"; const decode_tag = (props: { wire: ProtobufWire; diff --git a/src/transformers/features/llm/LlmApplicationTransformer.ts b/src/transformers/features/llm/LlmApplicationTransformer.ts index e0d0c0f269..3b9e912f19 100644 --- a/src/transformers/features/llm/LlmApplicationTransformer.ts +++ b/src/transformers/features/llm/LlmApplicationTransformer.ts @@ -67,7 +67,7 @@ export namespace LlmApplicationTransformer { }), ts.factory.createExpressionStatement( ts.factory.createCallExpression( - props.context.importer.internal("$llmApplicationFinalize"), + props.context.importer.internal("llmApplicationFinalize"), undefined, [ ts.factory.createIdentifier("app"), diff --git a/test-esm/package.json b/test-esm/package.json index 8567c65f52..1b261039fc 100644 --- a/test-esm/package.json +++ b/test-esm/package.json @@ -36,6 +36,6 @@ "typescript": "^5.4.5" }, "dependencies": { - "typia": "../typia-7.0.0-dev.20241022-3.tgz" + "typia": "../typia-7.0.0-dev.20241022-4.tgz" } } \ No newline at end of file diff --git a/test/generate/output/generate_json.ts b/test/generate/output/generate_json.ts index 261f077b0e..32a96990f5 100644 --- a/test/generate/output/generate_json.ts +++ b/test/generate/output/generate_json.ts @@ -1,8 +1,8 @@ import typia, { tags } from "typia"; -import * as __typia_transform_$assertGuard from "typia/lib/internal/$assertGuard.js"; -import * as __typia_transform_$jsonStringifyNumber from "typia/lib/internal/$jsonStringifyNumber.js"; -import * as __typia_transform_$jsonStringifyString from "typia/lib/internal/$jsonStringifyString.js"; -import * as __typia_transform_$validateReport from "typia/lib/internal/$validateReport.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; +import * as __typia_transform__jsonStringifyNumber from "typia/lib/internal/_jsonStringifyNumber.js"; +import * as __typia_transform__jsonStringifyString from "typia/lib/internal/_jsonStringifyString.js"; +import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js"; interface ICitizen { id: string & tags.Format<"uuid">; @@ -16,9 +16,9 @@ interface ICitizen { children: ICitizen[]; } export const createStringify = (() => { - const $so0 = (input: any): any => - `{"id":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.id)},"name":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.name)},"email":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.email)},"age":${__typia_transform_$jsonStringifyNumber.$jsonStringifyNumber(input.age)},"motto":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.motto)},"birthdate":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.birthdate.toJSON())},"died_at":${null !== input.died_at ? __typia_transform_$jsonStringifyString.$jsonStringifyString(input.died_at.toJSON()) : "null"},"parent":${null !== input.parent ? $so0(input.parent) : "null"},"children":${`[${input.children.map((elem: any) => $so0(elem)).join(",")}]`}}`; - const $io0 = (input: any): boolean => + const _so0 = (input: any): any => + `{"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"email":${__typia_transform__jsonStringifyString._jsonStringifyString(input.email)},"age":${__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.age)},"motto":${__typia_transform__jsonStringifyString._jsonStringifyString(input.motto)},"birthdate":${__typia_transform__jsonStringifyString._jsonStringifyString(input.birthdate.toJSON())},"died_at":${null !== input.died_at ? __typia_transform__jsonStringifyString._jsonStringifyString(input.died_at.toJSON()) : "null"},"parent":${null !== input.parent ? _so0(input.parent) : "null"},"children":${`[${input.children.map((elem: any) => _so0(elem)).join(",")}]`}}`; + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -40,15 +40,15 @@ export const createStringify = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - return (input: ICitizen): string => $so0(input); + return (input: ICitizen): string => _so0(input); })(); export const createIsStringify = (() => { - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -70,21 +70,21 @@ export const createIsStringify = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $so0 = (input: any): any => - `{"id":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.id)},"name":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.name)},"email":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.email)},"age":${__typia_transform_$jsonStringifyNumber.$jsonStringifyNumber(input.age)},"motto":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.motto)},"birthdate":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.birthdate.toJSON())},"died_at":${null !== input.died_at ? __typia_transform_$jsonStringifyString.$jsonStringifyString(input.died_at.toJSON()) : "null"},"parent":${null !== input.parent ? $so0(input.parent) : "null"},"children":${`[${input.children.map((elem: any) => $so0(elem)).join(",")}]`}}`; + const _so0 = (input: any): any => + `{"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"email":${__typia_transform__jsonStringifyString._jsonStringifyString(input.email)},"age":${__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.age)},"motto":${__typia_transform__jsonStringifyString._jsonStringifyString(input.motto)},"birthdate":${__typia_transform__jsonStringifyString._jsonStringifyString(input.birthdate.toJSON())},"died_at":${null !== input.died_at ? __typia_transform__jsonStringifyString._jsonStringifyString(input.died_at.toJSON()) : "null"},"parent":${null !== input.parent ? _so0(input.parent) : "null"},"children":${`[${input.children.map((elem: any) => _so0(elem)).join(",")}]`}}`; const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); - const __stringify = (input: ICitizen): string => $so0(input); + "object" === typeof input && null !== input && _io0(input); + const __stringify = (input: ICitizen): string => _so0(input); return (input: any): string | null => __is(input) ? __stringify(input) : null; })(); export const createAssertStringify = (() => { - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -106,12 +106,12 @@ export const createAssertStringify = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $ao0 = ( + const _ao0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -120,7 +120,7 @@ export const createAssertStringify = (() => { (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -130,7 +130,7 @@ export const createAssertStringify = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -142,7 +142,7 @@ export const createAssertStringify = (() => { )) && (("string" === typeof input.name && (RegExp("^[A-Z][a-z]+$").test(input.name) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -152,7 +152,7 @@ export const createAssertStringify = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -166,7 +166,7 @@ export const createAssertStringify = (() => { (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( input.email, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -176,7 +176,7 @@ export const createAssertStringify = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -190,7 +190,7 @@ export const createAssertStringify = (() => { ((Math.floor(input.age) === input.age && 0 <= input.age && input.age <= 4294967295) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -201,7 +201,7 @@ export const createAssertStringify = (() => { _errorFactory, )) && (input.age < 100 || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -211,7 +211,7 @@ export const createAssertStringify = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -222,7 +222,7 @@ export const createAssertStringify = (() => { _errorFactory, )) && ("string" === typeof input.motto || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -233,7 +233,7 @@ export const createAssertStringify = (() => { _errorFactory, )) && (input.birthdate instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -245,7 +245,7 @@ export const createAssertStringify = (() => { )) && (null === input.died_at || input.died_at instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -257,7 +257,7 @@ export const createAssertStringify = (() => { )) && (null === input.parent || ((("object" === typeof input.parent && null !== input.parent) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -267,8 +267,8 @@ export const createAssertStringify = (() => { }, _errorFactory, )) && - $ao0(input.parent, _path + ".parent", true && _exceptionable)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -279,7 +279,7 @@ export const createAssertStringify = (() => { _errorFactory, )) && (((Array.isArray(input.children) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -292,7 +292,7 @@ export const createAssertStringify = (() => { input.children.every( (elem: any, _index2: number) => ((("object" === typeof elem && null !== elem) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -302,12 +302,12 @@ export const createAssertStringify = (() => { }, _errorFactory, )) && - $ao0( + _ao0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -318,7 +318,7 @@ export const createAssertStringify = (() => { _errorFactory, ), )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertStringify", @@ -328,10 +328,10 @@ export const createAssertStringify = (() => { }, _errorFactory, )); - const $so0 = (input: any): any => - `{"id":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.id)},"name":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.name)},"email":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.email)},"age":${__typia_transform_$jsonStringifyNumber.$jsonStringifyNumber(input.age)},"motto":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.motto)},"birthdate":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.birthdate.toJSON())},"died_at":${null !== input.died_at ? __typia_transform_$jsonStringifyString.$jsonStringifyString(input.died_at.toJSON()) : "null"},"parent":${null !== input.parent ? $so0(input.parent) : "null"},"children":${`[${input.children.map((elem: any) => $so0(elem)).join(",")}]`}}`; + const _so0 = (input: any): any => + `{"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"email":${__typia_transform__jsonStringifyString._jsonStringifyString(input.email)},"age":${__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.age)},"motto":${__typia_transform__jsonStringifyString._jsonStringifyString(input.motto)},"birthdate":${__typia_transform__jsonStringifyString._jsonStringifyString(input.birthdate.toJSON())},"died_at":${null !== input.died_at ? __typia_transform__jsonStringifyString._jsonStringifyString(input.died_at.toJSON()) : "null"},"parent":${null !== input.parent ? _so0(input.parent) : "null"},"children":${`[${input.children.map((elem: any) => _so0(elem)).join(",")}]`}}`; const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory: any; const __assert = ( input: any, @@ -341,7 +341,7 @@ export const createAssertStringify = (() => { _errorFactory = errorFactory; ((input: any, _path: string, _exceptionable: boolean = true) => ((("object" === typeof input && null !== input) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( true, { method: "typia.json.createAssertStringify", @@ -351,8 +351,8 @@ export const createAssertStringify = (() => { }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { method: "typia.json.createAssertStringify", @@ -365,7 +365,7 @@ export const createAssertStringify = (() => { } return input; }; - const __stringify = (input: ICitizen): string => $so0(input); + const __stringify = (input: ICitizen): string => _so0(input); return ( input: any, errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, @@ -375,7 +375,7 @@ export const createAssertStringify = (() => { }; })(); export const createValidateStringify = (() => { - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -397,12 +397,12 @@ export const createValidateStringify = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $vo0 = ( + const _vo0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -494,7 +494,7 @@ export const createValidateStringify = (() => { expected: "(ICitizen | null)", value: input.parent, })) && - $vo0(input.parent, _path + ".parent", true && _exceptionable)) || + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || $report(_exceptionable, { path: _path + ".parent", expected: "(ICitizen | null)", @@ -515,7 +515,7 @@ export const createValidateStringify = (() => { expected: "ICitizen", value: elem, })) && - $vo0( + _vo0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, @@ -533,16 +533,16 @@ export const createValidateStringify = (() => { value: input.children, }), ].every((flag: boolean) => flag); - const $so0 = (input: any): any => - `{"id":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.id)},"name":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.name)},"email":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.email)},"age":${__typia_transform_$jsonStringifyNumber.$jsonStringifyNumber(input.age)},"motto":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.motto)},"birthdate":${__typia_transform_$jsonStringifyString.$jsonStringifyString(input.birthdate.toJSON())},"died_at":${null !== input.died_at ? __typia_transform_$jsonStringifyString.$jsonStringifyString(input.died_at.toJSON()) : "null"},"parent":${null !== input.parent ? $so0(input.parent) : "null"},"children":${`[${input.children.map((elem: any) => $so0(elem)).join(",")}]`}}`; + const _so0 = (input: any): any => + `{"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"email":${__typia_transform__jsonStringifyString._jsonStringifyString(input.email)},"age":${__typia_transform__jsonStringifyNumber._jsonStringifyNumber(input.age)},"motto":${__typia_transform__jsonStringifyString._jsonStringifyString(input.motto)},"birthdate":${__typia_transform__jsonStringifyString._jsonStringifyString(input.birthdate.toJSON())},"died_at":${null !== input.died_at ? __typia_transform__jsonStringifyString._jsonStringifyString(input.died_at.toJSON()) : "null"},"parent":${null !== input.parent ? _so0(input.parent) : "null"},"children":${`[${input.children.map((elem: any) => _so0(elem)).join(",")}]`}}`; const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let errors: any; let $report: any; const __validate = (input: any): import("typia").IValidation => { if (false === __is(input)) { errors = []; - $report = (__typia_transform_$validateReport.$validateReport as any)( + $report = (__typia_transform__validateReport._validateReport as any)( errors, ); ((input: any, _path: string, _exceptionable: boolean = true) => @@ -552,7 +552,7 @@ export const createValidateStringify = (() => { expected: "ICitizen", value: input, })) && - $vo0(input, _path + "", true)) || + _vo0(input, _path + "", true)) || $report(true, { path: _path + "", expected: "ICitizen", @@ -571,7 +571,7 @@ export const createValidateStringify = (() => { data: input, } as any; }; - const __stringify = (input: ICitizen): string => $so0(input); + const __stringify = (input: ICitizen): string => _so0(input); return (input: any): import("typia").IValidation => { const result = __validate(input) as any; if (result.success) result.data = __stringify(input); @@ -579,7 +579,7 @@ export const createValidateStringify = (() => { }; })(); export const createIsParse = (() => { - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -601,20 +601,20 @@ export const createIsParse = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); return (input: string): import("typia").Primitive | null => { input = JSON.parse(input); return __is(input) ? (input as any) : null; }; })(); export const createAssertParse = (() => { - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -636,12 +636,12 @@ export const createAssertParse = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $ao0 = ( + const _ao0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -650,7 +650,7 @@ export const createAssertParse = (() => { (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -660,7 +660,7 @@ export const createAssertParse = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -672,7 +672,7 @@ export const createAssertParse = (() => { )) && (("string" === typeof input.name && (RegExp("^[A-Z][a-z]+$").test(input.name) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -682,7 +682,7 @@ export const createAssertParse = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -696,7 +696,7 @@ export const createAssertParse = (() => { (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( input.email, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -706,7 +706,7 @@ export const createAssertParse = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -720,7 +720,7 @@ export const createAssertParse = (() => { ((Math.floor(input.age) === input.age && 0 <= input.age && input.age <= 4294967295) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -731,7 +731,7 @@ export const createAssertParse = (() => { _errorFactory, )) && (input.age < 100 || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -741,7 +741,7 @@ export const createAssertParse = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -752,7 +752,7 @@ export const createAssertParse = (() => { _errorFactory, )) && ("string" === typeof input.motto || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -763,7 +763,7 @@ export const createAssertParse = (() => { _errorFactory, )) && (input.birthdate instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -775,7 +775,7 @@ export const createAssertParse = (() => { )) && (null === input.died_at || input.died_at instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -787,7 +787,7 @@ export const createAssertParse = (() => { )) && (null === input.parent || ((("object" === typeof input.parent && null !== input.parent) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -797,8 +797,8 @@ export const createAssertParse = (() => { }, _errorFactory, )) && - $ao0(input.parent, _path + ".parent", true && _exceptionable)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -809,7 +809,7 @@ export const createAssertParse = (() => { _errorFactory, )) && (((Array.isArray(input.children) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -822,7 +822,7 @@ export const createAssertParse = (() => { input.children.every( (elem: any, _index2: number) => ((("object" === typeof elem && null !== elem) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -832,12 +832,12 @@ export const createAssertParse = (() => { }, _errorFactory, )) && - $ao0( + _ao0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -848,7 +848,7 @@ export const createAssertParse = (() => { _errorFactory, ), )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.json.createAssertParse", @@ -859,7 +859,7 @@ export const createAssertParse = (() => { _errorFactory, )); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory: any; const __assert = ( input: any, @@ -869,7 +869,7 @@ export const createAssertParse = (() => { _errorFactory = errorFactory; ((input: any, _path: string, _exceptionable: boolean = true) => ((("object" === typeof input && null !== input) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( true, { method: "typia.json.createAssertParse", @@ -879,8 +879,8 @@ export const createAssertParse = (() => { }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { method: "typia.json.createAssertParse", @@ -900,7 +900,7 @@ export const createAssertParse = (() => { __assert(JSON.parse(input), errorFactory) as any; })(); export const createValidateParse = (() => { - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -922,12 +922,12 @@ export const createValidateParse = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $vo0 = ( + const _vo0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -1019,7 +1019,7 @@ export const createValidateParse = (() => { expected: "(ICitizen | null)", value: input.parent, })) && - $vo0(input.parent, _path + ".parent", true && _exceptionable)) || + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || $report(_exceptionable, { path: _path + ".parent", expected: "(ICitizen | null)", @@ -1040,7 +1040,7 @@ export const createValidateParse = (() => { expected: "ICitizen", value: elem, })) && - $vo0( + _vo0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, @@ -1059,13 +1059,13 @@ export const createValidateParse = (() => { }), ].every((flag: boolean) => flag); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let errors: any; let $report: any; const __validate = (input: any): import("typia").IValidation => { if (false === __is(input)) { errors = []; - $report = (__typia_transform_$validateReport.$validateReport as any)( + $report = (__typia_transform__validateReport._validateReport as any)( errors, ); ((input: any, _path: string, _exceptionable: boolean = true) => @@ -1075,7 +1075,7 @@ export const createValidateParse = (() => { expected: "ICitizen", value: input, })) && - $vo0(input, _path + "", true)) || + _vo0(input, _path + "", true)) || $report(true, { path: _path + "", expected: "ICitizen", diff --git a/test/generate/output/generate_misc.ts b/test/generate/output/generate_misc.ts index 5b57ae187b..882b5bdf74 100644 --- a/test/generate/output/generate_misc.ts +++ b/test/generate/output/generate_misc.ts @@ -1,6 +1,6 @@ import typia, { tags } from "typia"; -import * as __typia_transform_$assertGuard from "typia/lib/internal/$assertGuard.js"; -import * as __typia_transform_$validateReport from "typia/lib/internal/$validateReport.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; +import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js"; interface ICitizen { id: string & tags.Format<"uuid">; @@ -14,8 +14,8 @@ interface ICitizen { children: ICitizen[]; } export const createClone = (() => { - const $cp0 = (input: any) => input.map((elem: any) => $co0(elem) as any); - const $co0 = (input: any): any => ({ + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _co0 = (input: any): any => ({ id: input.id, name: input.name, email: input.email, @@ -23,10 +23,10 @@ export const createClone = (() => { motto: input.motto, birthdate: new Date(input.birthdate) as any, died_at: input.died_at ? new Date(input.died_at) : (input.died_at as any), - parent: input.parent ? $co0(input.parent) : (input.parent as any), - children: $cp0(input.children) as any, + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, }); - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -48,17 +48,17 @@ export const createClone = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); return (input: ICitizen): import("typia").Resolved => - $co0(input) as any; + _co0(input) as any; })(); export const createAssertClone = (() => { - const $cp0 = (input: any) => input.map((elem: any) => $co0(elem) as any); - const $io0 = (input: any): boolean => + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -80,12 +80,12 @@ export const createAssertClone = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $ao0 = ( + const _ao0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -94,7 +94,7 @@ export const createAssertClone = (() => { (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -104,7 +104,7 @@ export const createAssertClone = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -116,7 +116,7 @@ export const createAssertClone = (() => { )) && (("string" === typeof input.name && (RegExp("^[A-Z][a-z]+$").test(input.name) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -126,7 +126,7 @@ export const createAssertClone = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -140,7 +140,7 @@ export const createAssertClone = (() => { (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( input.email, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -150,7 +150,7 @@ export const createAssertClone = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -164,7 +164,7 @@ export const createAssertClone = (() => { ((Math.floor(input.age) === input.age && 0 <= input.age && input.age <= 4294967295) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -175,7 +175,7 @@ export const createAssertClone = (() => { _errorFactory, )) && (input.age < 100 || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -185,7 +185,7 @@ export const createAssertClone = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -196,7 +196,7 @@ export const createAssertClone = (() => { _errorFactory, )) && ("string" === typeof input.motto || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -207,7 +207,7 @@ export const createAssertClone = (() => { _errorFactory, )) && (input.birthdate instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -219,7 +219,7 @@ export const createAssertClone = (() => { )) && (null === input.died_at || input.died_at instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -231,7 +231,7 @@ export const createAssertClone = (() => { )) && (null === input.parent || ((("object" === typeof input.parent && null !== input.parent) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -241,8 +241,8 @@ export const createAssertClone = (() => { }, _errorFactory, )) && - $ao0(input.parent, _path + ".parent", true && _exceptionable)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -253,7 +253,7 @@ export const createAssertClone = (() => { _errorFactory, )) && (((Array.isArray(input.children) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -266,7 +266,7 @@ export const createAssertClone = (() => { input.children.every( (elem: any, _index2: number) => ((("object" === typeof elem && null !== elem) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -276,12 +276,12 @@ export const createAssertClone = (() => { }, _errorFactory, )) && - $ao0( + _ao0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -292,7 +292,7 @@ export const createAssertClone = (() => { _errorFactory, ), )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertClone", @@ -302,7 +302,7 @@ export const createAssertClone = (() => { }, _errorFactory, )); - const $co0 = (input: any): any => ({ + const _co0 = (input: any): any => ({ id: input.id, name: input.name, email: input.email, @@ -310,11 +310,11 @@ export const createAssertClone = (() => { motto: input.motto, birthdate: new Date(input.birthdate) as any, died_at: input.died_at ? new Date(input.died_at) : (input.died_at as any), - parent: input.parent ? $co0(input.parent) : (input.parent as any), - children: $cp0(input.children) as any, + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, }); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory: any; const __assert = ( input: any, @@ -324,7 +324,7 @@ export const createAssertClone = (() => { _errorFactory = errorFactory; ((input: any, _path: string, _exceptionable: boolean = true) => ((("object" === typeof input && null !== input) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( true, { method: "typia.misc.createAssertClone", @@ -334,8 +334,8 @@ export const createAssertClone = (() => { }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { method: "typia.misc.createAssertClone", @@ -349,7 +349,7 @@ export const createAssertClone = (() => { return input; }; const __clone = (input: ICitizen): import("typia").Resolved => - $co0(input) as any; + _co0(input) as any; return ( input: any, errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, @@ -357,8 +357,8 @@ export const createAssertClone = (() => { __clone(__assert(input, errorFactory)); })(); export const createIsClone = (() => { - const $cp0 = (input: any) => input.map((elem: any) => $co0(elem) as any); - const $io0 = (input: any): boolean => + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -380,12 +380,12 @@ export const createIsClone = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $co0 = (input: any): any => ({ + const _co0 = (input: any): any => ({ id: input.id, name: input.name, email: input.email, @@ -393,21 +393,21 @@ export const createIsClone = (() => { motto: input.motto, birthdate: new Date(input.birthdate) as any, died_at: input.died_at ? new Date(input.died_at) : (input.died_at as any), - parent: input.parent ? $co0(input.parent) : (input.parent as any), - children: $cp0(input.children) as any, + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, }); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); const __clone = (input: ICitizen): import("typia").Resolved => - $co0(input) as any; + _co0(input) as any; return (input: any): import("typia").Resolved | null => { if (!__is(input)) return null; return __clone(input); }; })(); export const createValidateClone = (() => { - const $cp0 = (input: any) => input.map((elem: any) => $co0(elem) as any); - const $io0 = (input: any): boolean => + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -429,12 +429,12 @@ export const createValidateClone = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $vo0 = ( + const _vo0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -526,7 +526,7 @@ export const createValidateClone = (() => { expected: "(ICitizen | null)", value: input.parent, })) && - $vo0(input.parent, _path + ".parent", true && _exceptionable)) || + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || $report(_exceptionable, { path: _path + ".parent", expected: "(ICitizen | null)", @@ -547,7 +547,7 @@ export const createValidateClone = (() => { expected: "ICitizen", value: elem, })) && - $vo0( + _vo0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, @@ -565,7 +565,7 @@ export const createValidateClone = (() => { value: input.children, }), ].every((flag: boolean) => flag); - const $co0 = (input: any): any => ({ + const _co0 = (input: any): any => ({ id: input.id, name: input.name, email: input.email, @@ -573,17 +573,17 @@ export const createValidateClone = (() => { motto: input.motto, birthdate: new Date(input.birthdate) as any, died_at: input.died_at ? new Date(input.died_at) : (input.died_at as any), - parent: input.parent ? $co0(input.parent) : (input.parent as any), - children: $cp0(input.children) as any, + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, }); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let errors: any; let $report: any; const __validate = (input: any): import("typia").IValidation => { if (false === __is(input)) { errors = []; - $report = (__typia_transform_$validateReport.$validateReport as any)( + $report = (__typia_transform__validateReport._validateReport as any)( errors, ); ((input: any, _path: string, _exceptionable: boolean = true) => @@ -593,7 +593,7 @@ export const createValidateClone = (() => { expected: "ICitizen", value: input, })) && - $vo0(input, _path + "", true)) || + _vo0(input, _path + "", true)) || $report(true, { path: _path + "", expected: "ICitizen", @@ -613,7 +613,7 @@ export const createValidateClone = (() => { } as any; }; const __clone = (input: ICitizen): import("typia").Resolved => - $co0(input) as any; + _co0(input) as any; return ( input: any, ): import("typia").IValidation> => { @@ -623,14 +623,14 @@ export const createValidateClone = (() => { }; })(); export const createPrune = (() => { - const $pp0 = (input: any) => + const _pp0 = (input: any) => input.forEach((elem: any) => { - if ("object" === typeof elem && null !== elem) $po0(elem); + if ("object" === typeof elem && null !== elem) _po0(elem); }); - const $po0 = (input: any): any => { + const _po0 = (input: any): any => { if ("object" === typeof input.parent && null !== input.parent) - $po0(input.parent); - if (Array.isArray(input.children)) $pp0(input.children); + _po0(input.parent); + if (Array.isArray(input.children)) _pp0(input.children); for (const key of Object.keys(input)) { if ( "id" === key || @@ -647,7 +647,7 @@ export const createPrune = (() => { delete input[key]; } }; - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -669,21 +669,21 @@ export const createPrune = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); return (input: ICitizen): void => { - if ("object" === typeof input && null !== input) $po0(input); + if ("object" === typeof input && null !== input) _po0(input); }; })(); export const createAssertPrune = (() => { - const $pp0 = (input: any) => + const _pp0 = (input: any) => input.forEach((elem: any) => { - if ("object" === typeof elem && null !== elem) $po0(elem); + if ("object" === typeof elem && null !== elem) _po0(elem); }); - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -705,12 +705,12 @@ export const createAssertPrune = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $ao0 = ( + const _ao0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -719,7 +719,7 @@ export const createAssertPrune = (() => { (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -729,7 +729,7 @@ export const createAssertPrune = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -741,7 +741,7 @@ export const createAssertPrune = (() => { )) && (("string" === typeof input.name && (RegExp("^[A-Z][a-z]+$").test(input.name) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -751,7 +751,7 @@ export const createAssertPrune = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -765,7 +765,7 @@ export const createAssertPrune = (() => { (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( input.email, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -775,7 +775,7 @@ export const createAssertPrune = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -789,7 +789,7 @@ export const createAssertPrune = (() => { ((Math.floor(input.age) === input.age && 0 <= input.age && input.age <= 4294967295) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -800,7 +800,7 @@ export const createAssertPrune = (() => { _errorFactory, )) && (input.age < 100 || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -810,7 +810,7 @@ export const createAssertPrune = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -821,7 +821,7 @@ export const createAssertPrune = (() => { _errorFactory, )) && ("string" === typeof input.motto || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -832,7 +832,7 @@ export const createAssertPrune = (() => { _errorFactory, )) && (input.birthdate instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -844,7 +844,7 @@ export const createAssertPrune = (() => { )) && (null === input.died_at || input.died_at instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -856,7 +856,7 @@ export const createAssertPrune = (() => { )) && (null === input.parent || ((("object" === typeof input.parent && null !== input.parent) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -866,8 +866,8 @@ export const createAssertPrune = (() => { }, _errorFactory, )) && - $ao0(input.parent, _path + ".parent", true && _exceptionable)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -878,7 +878,7 @@ export const createAssertPrune = (() => { _errorFactory, )) && (((Array.isArray(input.children) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -891,7 +891,7 @@ export const createAssertPrune = (() => { input.children.every( (elem: any, _index2: number) => ((("object" === typeof elem && null !== elem) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -901,12 +901,12 @@ export const createAssertPrune = (() => { }, _errorFactory, )) && - $ao0( + _ao0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -917,7 +917,7 @@ export const createAssertPrune = (() => { _errorFactory, ), )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.misc.createAssertPrune", @@ -927,10 +927,10 @@ export const createAssertPrune = (() => { }, _errorFactory, )); - const $po0 = (input: any): any => { + const _po0 = (input: any): any => { if ("object" === typeof input.parent && null !== input.parent) - $po0(input.parent); - if (Array.isArray(input.children)) $pp0(input.children); + _po0(input.parent); + if (Array.isArray(input.children)) _pp0(input.children); for (const key of Object.keys(input)) { if ( "id" === key || @@ -948,7 +948,7 @@ export const createAssertPrune = (() => { } }; const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory: any; const __assert = ( input: any, @@ -958,7 +958,7 @@ export const createAssertPrune = (() => { _errorFactory = errorFactory; ((input: any, _path: string, _exceptionable: boolean = true) => ((("object" === typeof input && null !== input) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( true, { method: "typia.misc.createAssertPrune", @@ -968,8 +968,8 @@ export const createAssertPrune = (() => { }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { method: "typia.misc.createAssertPrune", @@ -983,7 +983,7 @@ export const createAssertPrune = (() => { return input; }; const __prune = (input: ICitizen): void => { - if ("object" === typeof input && null !== input) $po0(input); + if ("object" === typeof input && null !== input) _po0(input); }; return ( input: any, @@ -995,11 +995,11 @@ export const createAssertPrune = (() => { }; })(); export const createIsPrune = (() => { - const $pp0 = (input: any) => + const _pp0 = (input: any) => input.forEach((elem: any) => { - if ("object" === typeof elem && null !== elem) $po0(elem); + if ("object" === typeof elem && null !== elem) _po0(elem); }); - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -1021,15 +1021,15 @@ export const createIsPrune = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $po0 = (input: any): any => { + const _po0 = (input: any): any => { if ("object" === typeof input.parent && null !== input.parent) - $po0(input.parent); - if (Array.isArray(input.children)) $pp0(input.children); + _po0(input.parent); + if (Array.isArray(input.children)) _pp0(input.children); for (const key of Object.keys(input)) { if ( "id" === key || @@ -1047,9 +1047,9 @@ export const createIsPrune = (() => { } }; const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); const __prune = (input: ICitizen): void => { - if ("object" === typeof input && null !== input) $po0(input); + if ("object" === typeof input && null !== input) _po0(input); }; return (input: any): input is ICitizen => { if (false == __is(input)) return false; @@ -1058,11 +1058,11 @@ export const createIsPrune = (() => { }; })(); export const createValidatePrune = (() => { - const $pp0 = (input: any) => + const _pp0 = (input: any) => input.forEach((elem: any) => { - if ("object" === typeof elem && null !== elem) $po0(elem); + if ("object" === typeof elem && null !== elem) _po0(elem); }); - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -1084,12 +1084,12 @@ export const createValidatePrune = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $vo0 = ( + const _vo0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -1181,7 +1181,7 @@ export const createValidatePrune = (() => { expected: "(ICitizen | null)", value: input.parent, })) && - $vo0(input.parent, _path + ".parent", true && _exceptionable)) || + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || $report(_exceptionable, { path: _path + ".parent", expected: "(ICitizen | null)", @@ -1202,7 +1202,7 @@ export const createValidatePrune = (() => { expected: "ICitizen", value: elem, })) && - $vo0( + _vo0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, @@ -1220,10 +1220,10 @@ export const createValidatePrune = (() => { value: input.children, }), ].every((flag: boolean) => flag); - const $po0 = (input: any): any => { + const _po0 = (input: any): any => { if ("object" === typeof input.parent && null !== input.parent) - $po0(input.parent); - if (Array.isArray(input.children)) $pp0(input.children); + _po0(input.parent); + if (Array.isArray(input.children)) _pp0(input.children); for (const key of Object.keys(input)) { if ( "id" === key || @@ -1241,13 +1241,13 @@ export const createValidatePrune = (() => { } }; const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let errors: any; let $report: any; const __validate = (input: any): import("typia").IValidation => { if (false === __is(input)) { errors = []; - $report = (__typia_transform_$validateReport.$validateReport as any)( + $report = (__typia_transform__validateReport._validateReport as any)( errors, ); ((input: any, _path: string, _exceptionable: boolean = true) => @@ -1257,7 +1257,7 @@ export const createValidatePrune = (() => { expected: "ICitizen", value: input, })) && - $vo0(input, _path + "", true)) || + _vo0(input, _path + "", true)) || $report(true, { path: _path + "", expected: "ICitizen", @@ -1277,7 +1277,7 @@ export const createValidatePrune = (() => { } as any; }; const __prune = (input: ICitizen): void => { - if ("object" === typeof input && null !== input) $po0(input); + if ("object" === typeof input && null !== input) _po0(input); }; return (input: any): import("typia").IValidation => { const result = __validate(input); diff --git a/test/generate/output/generate_notations.ts b/test/generate/output/generate_notations.ts index 0787d6fae1..ba1b849808 100644 --- a/test/generate/output/generate_notations.ts +++ b/test/generate/output/generate_notations.ts @@ -1,6 +1,6 @@ import typia, { tags } from "typia"; -import * as __typia_transform_$assertGuard from "typia/lib/internal/$assertGuard.js"; -import * as __typia_transform_$validateReport from "typia/lib/internal/$validateReport.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; +import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js"; interface ICitizen { id: string & tags.Format<"uuid">; @@ -14,8 +14,8 @@ interface ICitizen { children: ICitizen[]; } export const createCamel = (() => { - const $cp0 = (input: any) => input.map((elem: any) => $co0(elem) as any); - const $co0 = (input: any): any => ({ + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _co0 = (input: any): any => ({ id: input.id, name: input.name, email: input.email, @@ -23,15 +23,15 @@ export const createCamel = (() => { motto: input.motto, birthdate: new Date(input.birthdate) as any, diedAt: input.died_at ? new Date(input.died_at) : (input.died_at as any), - parent: input.parent ? $co0(input.parent) : (input.parent as any), - children: $cp0(input.children) as any, + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, }); return (input: ICitizen): import("typia").CamelCase => - $co0(input) as any; + _co0(input) as any; })(); export const createAssertCamel = (() => { - const $cp0 = (input: any) => input.map((elem: any) => $co0(elem) as any); - const $io0 = (input: any): boolean => + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -53,12 +53,12 @@ export const createAssertCamel = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $ao0 = ( + const _ao0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -67,7 +67,7 @@ export const createAssertCamel = (() => { (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -77,7 +77,7 @@ export const createAssertCamel = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -89,7 +89,7 @@ export const createAssertCamel = (() => { )) && (("string" === typeof input.name && (RegExp("^[A-Z][a-z]+$").test(input.name) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -99,7 +99,7 @@ export const createAssertCamel = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -113,7 +113,7 @@ export const createAssertCamel = (() => { (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( input.email, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -123,7 +123,7 @@ export const createAssertCamel = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -137,7 +137,7 @@ export const createAssertCamel = (() => { ((Math.floor(input.age) === input.age && 0 <= input.age && input.age <= 4294967295) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -148,7 +148,7 @@ export const createAssertCamel = (() => { _errorFactory, )) && (input.age < 100 || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -158,7 +158,7 @@ export const createAssertCamel = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -169,7 +169,7 @@ export const createAssertCamel = (() => { _errorFactory, )) && ("string" === typeof input.motto || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -180,7 +180,7 @@ export const createAssertCamel = (() => { _errorFactory, )) && (input.birthdate instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -192,7 +192,7 @@ export const createAssertCamel = (() => { )) && (null === input.died_at || input.died_at instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -204,7 +204,7 @@ export const createAssertCamel = (() => { )) && (null === input.parent || ((("object" === typeof input.parent && null !== input.parent) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -214,8 +214,8 @@ export const createAssertCamel = (() => { }, _errorFactory, )) && - $ao0(input.parent, _path + ".parent", true && _exceptionable)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -226,7 +226,7 @@ export const createAssertCamel = (() => { _errorFactory, )) && (((Array.isArray(input.children) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -239,7 +239,7 @@ export const createAssertCamel = (() => { input.children.every( (elem: any, _index2: number) => ((("object" === typeof elem && null !== elem) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -249,12 +249,12 @@ export const createAssertCamel = (() => { }, _errorFactory, )) && - $ao0( + _ao0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -265,7 +265,7 @@ export const createAssertCamel = (() => { _errorFactory, ), )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertCamel", @@ -275,7 +275,7 @@ export const createAssertCamel = (() => { }, _errorFactory, )); - const $co0 = (input: any): any => ({ + const _co0 = (input: any): any => ({ id: input.id, name: input.name, email: input.email, @@ -283,11 +283,11 @@ export const createAssertCamel = (() => { motto: input.motto, birthdate: new Date(input.birthdate) as any, diedAt: input.died_at ? new Date(input.died_at) : (input.died_at as any), - parent: input.parent ? $co0(input.parent) : (input.parent as any), - children: $cp0(input.children) as any, + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, }); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory: any; const __assert = ( input: any, @@ -297,7 +297,7 @@ export const createAssertCamel = (() => { _errorFactory = errorFactory; ((input: any, _path: string, _exceptionable: boolean = true) => ((("object" === typeof input && null !== input) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( true, { method: "typia.notations.createAssertCamel", @@ -307,8 +307,8 @@ export const createAssertCamel = (() => { }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { method: "typia.notations.createAssertCamel", @@ -322,7 +322,7 @@ export const createAssertCamel = (() => { return input; }; const __notation = (input: ICitizen): import("typia").CamelCase => - $co0(input) as any; + _co0(input) as any; return ( input: any, errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, @@ -330,8 +330,8 @@ export const createAssertCamel = (() => { __notation(__assert(input, errorFactory)); })(); export const createIsCamel = (() => { - const $cp0 = (input: any) => input.map((elem: any) => $co0(elem) as any); - const $io0 = (input: any): boolean => + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -353,12 +353,12 @@ export const createIsCamel = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $co0 = (input: any): any => ({ + const _co0 = (input: any): any => ({ id: input.id, name: input.name, email: input.email, @@ -366,21 +366,21 @@ export const createIsCamel = (() => { motto: input.motto, birthdate: new Date(input.birthdate) as any, diedAt: input.died_at ? new Date(input.died_at) : (input.died_at as any), - parent: input.parent ? $co0(input.parent) : (input.parent as any), - children: $cp0(input.children) as any, + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, }); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); const __notation = (input: ICitizen): import("typia").CamelCase => - $co0(input) as any; + _co0(input) as any; return (input: any): import("typia").CamelCase | null => { if (!__is(input)) return null; return __notation(input); }; })(); export const createValidateCamel = (() => { - const $cp0 = (input: any) => input.map((elem: any) => $co0(elem) as any); - const $io0 = (input: any): boolean => + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -402,12 +402,12 @@ export const createValidateCamel = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $vo0 = ( + const _vo0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -499,7 +499,7 @@ export const createValidateCamel = (() => { expected: "(ICitizen | null)", value: input.parent, })) && - $vo0(input.parent, _path + ".parent", true && _exceptionable)) || + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || $report(_exceptionable, { path: _path + ".parent", expected: "(ICitizen | null)", @@ -520,7 +520,7 @@ export const createValidateCamel = (() => { expected: "ICitizen", value: elem, })) && - $vo0( + _vo0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, @@ -538,7 +538,7 @@ export const createValidateCamel = (() => { value: input.children, }), ].every((flag: boolean) => flag); - const $co0 = (input: any): any => ({ + const _co0 = (input: any): any => ({ id: input.id, name: input.name, email: input.email, @@ -546,17 +546,17 @@ export const createValidateCamel = (() => { motto: input.motto, birthdate: new Date(input.birthdate) as any, diedAt: input.died_at ? new Date(input.died_at) : (input.died_at as any), - parent: input.parent ? $co0(input.parent) : (input.parent as any), - children: $cp0(input.children) as any, + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, }); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let errors: any; let $report: any; const __validate = (input: any): import("typia").IValidation => { if (false === __is(input)) { errors = []; - $report = (__typia_transform_$validateReport.$validateReport as any)( + $report = (__typia_transform__validateReport._validateReport as any)( errors, ); ((input: any, _path: string, _exceptionable: boolean = true) => @@ -566,7 +566,7 @@ export const createValidateCamel = (() => { expected: "ICitizen", value: input, })) && - $vo0(input, _path + "", true)) || + _vo0(input, _path + "", true)) || $report(true, { path: _path + "", expected: "ICitizen", @@ -586,7 +586,7 @@ export const createValidateCamel = (() => { } as any; }; const __notation = (input: ICitizen): import("typia").CamelCase => - $co0(input) as any; + _co0(input) as any; return ( input: any, ): import("typia").IValidation> => { @@ -596,8 +596,8 @@ export const createValidateCamel = (() => { }; })(); export const createPascal = (() => { - const $cp0 = (input: any) => input.map((elem: any) => $co0(elem) as any); - const $co0 = (input: any): any => ({ + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _co0 = (input: any): any => ({ Id: input.id, Name: input.name, Email: input.email, @@ -605,15 +605,15 @@ export const createPascal = (() => { Motto: input.motto, Birthdate: new Date(input.birthdate) as any, DiedAt: input.died_at ? new Date(input.died_at) : (input.died_at as any), - Parent: input.parent ? $co0(input.parent) : (input.parent as any), - Children: $cp0(input.children) as any, + Parent: input.parent ? _co0(input.parent) : (input.parent as any), + Children: _cp0(input.children) as any, }); return (input: ICitizen): import("typia").PascalCase => - $co0(input) as any; + _co0(input) as any; })(); export const createAssertPascal = (() => { - const $cp0 = (input: any) => input.map((elem: any) => $co0(elem) as any); - const $io0 = (input: any): boolean => + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -635,12 +635,12 @@ export const createAssertPascal = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $ao0 = ( + const _ao0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -649,7 +649,7 @@ export const createAssertPascal = (() => { (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -659,7 +659,7 @@ export const createAssertPascal = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -671,7 +671,7 @@ export const createAssertPascal = (() => { )) && (("string" === typeof input.name && (RegExp("^[A-Z][a-z]+$").test(input.name) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -681,7 +681,7 @@ export const createAssertPascal = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -695,7 +695,7 @@ export const createAssertPascal = (() => { (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( input.email, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -705,7 +705,7 @@ export const createAssertPascal = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -719,7 +719,7 @@ export const createAssertPascal = (() => { ((Math.floor(input.age) === input.age && 0 <= input.age && input.age <= 4294967295) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -730,7 +730,7 @@ export const createAssertPascal = (() => { _errorFactory, )) && (input.age < 100 || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -740,7 +740,7 @@ export const createAssertPascal = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -751,7 +751,7 @@ export const createAssertPascal = (() => { _errorFactory, )) && ("string" === typeof input.motto || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -762,7 +762,7 @@ export const createAssertPascal = (() => { _errorFactory, )) && (input.birthdate instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -774,7 +774,7 @@ export const createAssertPascal = (() => { )) && (null === input.died_at || input.died_at instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -786,7 +786,7 @@ export const createAssertPascal = (() => { )) && (null === input.parent || ((("object" === typeof input.parent && null !== input.parent) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -796,8 +796,8 @@ export const createAssertPascal = (() => { }, _errorFactory, )) && - $ao0(input.parent, _path + ".parent", true && _exceptionable)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -808,7 +808,7 @@ export const createAssertPascal = (() => { _errorFactory, )) && (((Array.isArray(input.children) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -821,7 +821,7 @@ export const createAssertPascal = (() => { input.children.every( (elem: any, _index2: number) => ((("object" === typeof elem && null !== elem) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -831,12 +831,12 @@ export const createAssertPascal = (() => { }, _errorFactory, )) && - $ao0( + _ao0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -847,7 +847,7 @@ export const createAssertPascal = (() => { _errorFactory, ), )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertPascal", @@ -857,7 +857,7 @@ export const createAssertPascal = (() => { }, _errorFactory, )); - const $co0 = (input: any): any => ({ + const _co0 = (input: any): any => ({ Id: input.id, Name: input.name, Email: input.email, @@ -865,11 +865,11 @@ export const createAssertPascal = (() => { Motto: input.motto, Birthdate: new Date(input.birthdate) as any, DiedAt: input.died_at ? new Date(input.died_at) : (input.died_at as any), - Parent: input.parent ? $co0(input.parent) : (input.parent as any), - Children: $cp0(input.children) as any, + Parent: input.parent ? _co0(input.parent) : (input.parent as any), + Children: _cp0(input.children) as any, }); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory: any; const __assert = ( input: any, @@ -879,7 +879,7 @@ export const createAssertPascal = (() => { _errorFactory = errorFactory; ((input: any, _path: string, _exceptionable: boolean = true) => ((("object" === typeof input && null !== input) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( true, { method: "typia.notations.createAssertPascal", @@ -889,8 +889,8 @@ export const createAssertPascal = (() => { }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { method: "typia.notations.createAssertPascal", @@ -904,7 +904,7 @@ export const createAssertPascal = (() => { return input; }; const __notation = (input: ICitizen): import("typia").PascalCase => - $co0(input) as any; + _co0(input) as any; return ( input: any, errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, @@ -912,8 +912,8 @@ export const createAssertPascal = (() => { __notation(__assert(input, errorFactory)); })(); export const createIsPascal = (() => { - const $cp0 = (input: any) => input.map((elem: any) => $co0(elem) as any); - const $io0 = (input: any): boolean => + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -935,12 +935,12 @@ export const createIsPascal = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $co0 = (input: any): any => ({ + const _co0 = (input: any): any => ({ Id: input.id, Name: input.name, Email: input.email, @@ -948,21 +948,21 @@ export const createIsPascal = (() => { Motto: input.motto, Birthdate: new Date(input.birthdate) as any, DiedAt: input.died_at ? new Date(input.died_at) : (input.died_at as any), - Parent: input.parent ? $co0(input.parent) : (input.parent as any), - Children: $cp0(input.children) as any, + Parent: input.parent ? _co0(input.parent) : (input.parent as any), + Children: _cp0(input.children) as any, }); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); const __notation = (input: ICitizen): import("typia").PascalCase => - $co0(input) as any; + _co0(input) as any; return (input: any): import("typia").PascalCase | null => { if (!__is(input)) return null; return __notation(input); }; })(); export const createValidatePascal = (() => { - const $cp0 = (input: any) => input.map((elem: any) => $co0(elem) as any); - const $io0 = (input: any): boolean => + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -984,12 +984,12 @@ export const createValidatePascal = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $vo0 = ( + const _vo0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -1081,7 +1081,7 @@ export const createValidatePascal = (() => { expected: "(ICitizen | null)", value: input.parent, })) && - $vo0(input.parent, _path + ".parent", true && _exceptionable)) || + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || $report(_exceptionable, { path: _path + ".parent", expected: "(ICitizen | null)", @@ -1102,7 +1102,7 @@ export const createValidatePascal = (() => { expected: "ICitizen", value: elem, })) && - $vo0( + _vo0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, @@ -1120,7 +1120,7 @@ export const createValidatePascal = (() => { value: input.children, }), ].every((flag: boolean) => flag); - const $co0 = (input: any): any => ({ + const _co0 = (input: any): any => ({ Id: input.id, Name: input.name, Email: input.email, @@ -1128,17 +1128,17 @@ export const createValidatePascal = (() => { Motto: input.motto, Birthdate: new Date(input.birthdate) as any, DiedAt: input.died_at ? new Date(input.died_at) : (input.died_at as any), - Parent: input.parent ? $co0(input.parent) : (input.parent as any), - Children: $cp0(input.children) as any, + Parent: input.parent ? _co0(input.parent) : (input.parent as any), + Children: _cp0(input.children) as any, }); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let errors: any; let $report: any; const __validate = (input: any): import("typia").IValidation => { if (false === __is(input)) { errors = []; - $report = (__typia_transform_$validateReport.$validateReport as any)( + $report = (__typia_transform__validateReport._validateReport as any)( errors, ); ((input: any, _path: string, _exceptionable: boolean = true) => @@ -1148,7 +1148,7 @@ export const createValidatePascal = (() => { expected: "ICitizen", value: input, })) && - $vo0(input, _path + "", true)) || + _vo0(input, _path + "", true)) || $report(true, { path: _path + "", expected: "ICitizen", @@ -1168,7 +1168,7 @@ export const createValidatePascal = (() => { } as any; }; const __notation = (input: ICitizen): import("typia").PascalCase => - $co0(input) as any; + _co0(input) as any; return ( input: any, ): import("typia").IValidation> => { @@ -1178,8 +1178,8 @@ export const createValidatePascal = (() => { }; })(); export const createSnake = (() => { - const $cp0 = (input: any) => input.map((elem: any) => $co0(elem) as any); - const $co0 = (input: any): any => ({ + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _co0 = (input: any): any => ({ id: input.id, name: input.name, email: input.email, @@ -1187,15 +1187,15 @@ export const createSnake = (() => { motto: input.motto, birthdate: new Date(input.birthdate) as any, died_at: input.died_at ? new Date(input.died_at) : (input.died_at as any), - parent: input.parent ? $co0(input.parent) : (input.parent as any), - children: $cp0(input.children) as any, + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, }); return (input: ICitizen): import("typia").SnakeCase => - $co0(input) as any; + _co0(input) as any; })(); export const createAssertSnake = (() => { - const $cp0 = (input: any) => input.map((elem: any) => $co0(elem) as any); - const $io0 = (input: any): boolean => + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -1217,12 +1217,12 @@ export const createAssertSnake = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $ao0 = ( + const _ao0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -1231,7 +1231,7 @@ export const createAssertSnake = (() => { (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1241,7 +1241,7 @@ export const createAssertSnake = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1253,7 +1253,7 @@ export const createAssertSnake = (() => { )) && (("string" === typeof input.name && (RegExp("^[A-Z][a-z]+$").test(input.name) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1263,7 +1263,7 @@ export const createAssertSnake = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1277,7 +1277,7 @@ export const createAssertSnake = (() => { (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( input.email, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1287,7 +1287,7 @@ export const createAssertSnake = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1301,7 +1301,7 @@ export const createAssertSnake = (() => { ((Math.floor(input.age) === input.age && 0 <= input.age && input.age <= 4294967295) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1312,7 +1312,7 @@ export const createAssertSnake = (() => { _errorFactory, )) && (input.age < 100 || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1322,7 +1322,7 @@ export const createAssertSnake = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1333,7 +1333,7 @@ export const createAssertSnake = (() => { _errorFactory, )) && ("string" === typeof input.motto || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1344,7 +1344,7 @@ export const createAssertSnake = (() => { _errorFactory, )) && (input.birthdate instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1356,7 +1356,7 @@ export const createAssertSnake = (() => { )) && (null === input.died_at || input.died_at instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1368,7 +1368,7 @@ export const createAssertSnake = (() => { )) && (null === input.parent || ((("object" === typeof input.parent && null !== input.parent) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1378,8 +1378,8 @@ export const createAssertSnake = (() => { }, _errorFactory, )) && - $ao0(input.parent, _path + ".parent", true && _exceptionable)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1390,7 +1390,7 @@ export const createAssertSnake = (() => { _errorFactory, )) && (((Array.isArray(input.children) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1403,7 +1403,7 @@ export const createAssertSnake = (() => { input.children.every( (elem: any, _index2: number) => ((("object" === typeof elem && null !== elem) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1413,12 +1413,12 @@ export const createAssertSnake = (() => { }, _errorFactory, )) && - $ao0( + _ao0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1429,7 +1429,7 @@ export const createAssertSnake = (() => { _errorFactory, ), )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.notations.createAssertSnake", @@ -1439,7 +1439,7 @@ export const createAssertSnake = (() => { }, _errorFactory, )); - const $co0 = (input: any): any => ({ + const _co0 = (input: any): any => ({ id: input.id, name: input.name, email: input.email, @@ -1447,11 +1447,11 @@ export const createAssertSnake = (() => { motto: input.motto, birthdate: new Date(input.birthdate) as any, died_at: input.died_at ? new Date(input.died_at) : (input.died_at as any), - parent: input.parent ? $co0(input.parent) : (input.parent as any), - children: $cp0(input.children) as any, + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, }); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory: any; const __assert = ( input: any, @@ -1461,7 +1461,7 @@ export const createAssertSnake = (() => { _errorFactory = errorFactory; ((input: any, _path: string, _exceptionable: boolean = true) => ((("object" === typeof input && null !== input) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( true, { method: "typia.notations.createAssertSnake", @@ -1471,8 +1471,8 @@ export const createAssertSnake = (() => { }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { method: "typia.notations.createAssertSnake", @@ -1486,7 +1486,7 @@ export const createAssertSnake = (() => { return input; }; const __notation = (input: ICitizen): import("typia").SnakeCase => - $co0(input) as any; + _co0(input) as any; return ( input: any, errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error, @@ -1494,8 +1494,8 @@ export const createAssertSnake = (() => { __notation(__assert(input, errorFactory)); })(); export const createIsSnake = (() => { - const $cp0 = (input: any) => input.map((elem: any) => $co0(elem) as any); - const $io0 = (input: any): boolean => + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -1517,12 +1517,12 @@ export const createIsSnake = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $co0 = (input: any): any => ({ + const _co0 = (input: any): any => ({ id: input.id, name: input.name, email: input.email, @@ -1530,21 +1530,21 @@ export const createIsSnake = (() => { motto: input.motto, birthdate: new Date(input.birthdate) as any, died_at: input.died_at ? new Date(input.died_at) : (input.died_at as any), - parent: input.parent ? $co0(input.parent) : (input.parent as any), - children: $cp0(input.children) as any, + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, }); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); const __notation = (input: ICitizen): import("typia").SnakeCase => - $co0(input) as any; + _co0(input) as any; return (input: any): import("typia").SnakeCase | null => { if (!__is(input)) return null; return __notation(input); }; })(); export const createValidateSnake = (() => { - const $cp0 = (input: any) => input.map((elem: any) => $co0(elem) as any); - const $io0 = (input: any): boolean => + const _cp0 = (input: any) => input.map((elem: any) => _co0(elem) as any); + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -1566,12 +1566,12 @@ export const createValidateSnake = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $vo0 = ( + const _vo0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -1663,7 +1663,7 @@ export const createValidateSnake = (() => { expected: "(ICitizen | null)", value: input.parent, })) && - $vo0(input.parent, _path + ".parent", true && _exceptionable)) || + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || $report(_exceptionable, { path: _path + ".parent", expected: "(ICitizen | null)", @@ -1684,7 +1684,7 @@ export const createValidateSnake = (() => { expected: "ICitizen", value: elem, })) && - $vo0( + _vo0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, @@ -1702,7 +1702,7 @@ export const createValidateSnake = (() => { value: input.children, }), ].every((flag: boolean) => flag); - const $co0 = (input: any): any => ({ + const _co0 = (input: any): any => ({ id: input.id, name: input.name, email: input.email, @@ -1710,17 +1710,17 @@ export const createValidateSnake = (() => { motto: input.motto, birthdate: new Date(input.birthdate) as any, died_at: input.died_at ? new Date(input.died_at) : (input.died_at as any), - parent: input.parent ? $co0(input.parent) : (input.parent as any), - children: $cp0(input.children) as any, + parent: input.parent ? _co0(input.parent) : (input.parent as any), + children: _cp0(input.children) as any, }); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let errors: any; let $report: any; const __validate = (input: any): import("typia").IValidation => { if (false === __is(input)) { errors = []; - $report = (__typia_transform_$validateReport.$validateReport as any)( + $report = (__typia_transform__validateReport._validateReport as any)( errors, ); ((input: any, _path: string, _exceptionable: boolean = true) => @@ -1730,7 +1730,7 @@ export const createValidateSnake = (() => { expected: "ICitizen", value: input, })) && - $vo0(input, _path + "", true)) || + _vo0(input, _path + "", true)) || $report(true, { path: _path + "", expected: "ICitizen", @@ -1750,7 +1750,7 @@ export const createValidateSnake = (() => { } as any; }; const __notation = (input: ICitizen): import("typia").SnakeCase => - $co0(input) as any; + _co0(input) as any; return ( input: any, ): import("typia").IValidation> => { diff --git a/test/generate/output/generate_plain.ts b/test/generate/output/generate_plain.ts index 633b5b535b..4c37b54824 100644 --- a/test/generate/output/generate_plain.ts +++ b/test/generate/output/generate_plain.ts @@ -1,15 +1,15 @@ import typia, { tags } from "typia"; -import * as __typia_transform_$accessExpressionAsString from "typia/lib/internal/$accessExpressionAsString.js"; -import * as __typia_transform_$assertGuard from "typia/lib/internal/$assertGuard.js"; -import * as __typia_transform_$randomArray from "typia/lib/internal/$randomArray.js"; -import * as __typia_transform_$randomFormatDatetime from "typia/lib/internal/$randomFormatDatetime.js"; -import * as __typia_transform_$randomFormatEmail from "typia/lib/internal/$randomFormatEmail.js"; -import * as __typia_transform_$randomFormatUuid from "typia/lib/internal/$randomFormatUuid.js"; -import * as __typia_transform_$randomInteger from "typia/lib/internal/$randomInteger.js"; -import * as __typia_transform_$randomPattern from "typia/lib/internal/$randomPattern.js"; -import * as __typia_transform_$randomPick from "typia/lib/internal/$randomPick.js"; -import * as __typia_transform_$randomString from "typia/lib/internal/$randomString.js"; -import * as __typia_transform_$validateReport from "typia/lib/internal/$validateReport.js"; +import * as __typia_transform__accessExpressionAsString from "typia/lib/internal/_accessExpressionAsString.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; +import * as __typia_transform__randomArray from "typia/lib/internal/_randomArray.js"; +import * as __typia_transform__randomFormatDatetime from "typia/lib/internal/_randomFormatDatetime.js"; +import * as __typia_transform__randomFormatEmail from "typia/lib/internal/_randomFormatEmail.js"; +import * as __typia_transform__randomFormatUuid from "typia/lib/internal/_randomFormatUuid.js"; +import * as __typia_transform__randomInteger from "typia/lib/internal/_randomInteger.js"; +import * as __typia_transform__randomPattern from "typia/lib/internal/_randomPattern.js"; +import * as __typia_transform__randomPick from "typia/lib/internal/_randomPick.js"; +import * as __typia_transform__randomString from "typia/lib/internal/_randomString.js"; +import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js"; interface ICitizen { id: string & tags.Format<"uuid">; @@ -23,7 +23,7 @@ interface ICitizen { children: ICitizen[]; } export const createIs = (() => { - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -45,16 +45,16 @@ export const createIs = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); return (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); })(); export const createEquals = (() => { - const $io0 = (input: any, _exceptionable: boolean = true): boolean => + const _io0 = (input: any, _exceptionable: boolean = true): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -76,13 +76,13 @@ export const createEquals = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent, true && _exceptionable))) && + _io0(input.parent, true && _exceptionable))) && Array.isArray(input.children) && input.children.every( (elem: any, _index1: number) => "object" === typeof elem && null !== elem && - $io0(elem, true && _exceptionable), + _io0(elem, true && _exceptionable), ) && (9 === Object.keys(input).length || Object.keys(input).every((key: any) => { @@ -105,10 +105,10 @@ export const createEquals = (() => { return false; })); return (input: any, _exceptionable: boolean = true): input is ICitizen => - "object" === typeof input && null !== input && $io0(input, true); + "object" === typeof input && null !== input && _io0(input, true); })(); export const createAssert = (() => { - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -130,12 +130,12 @@ export const createAssert = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $ao0 = ( + const _ao0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -144,7 +144,7 @@ export const createAssert = (() => { (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -154,7 +154,7 @@ export const createAssert = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -166,7 +166,7 @@ export const createAssert = (() => { )) && (("string" === typeof input.name && (RegExp("^[A-Z][a-z]+$").test(input.name) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -176,7 +176,7 @@ export const createAssert = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -190,7 +190,7 @@ export const createAssert = (() => { (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( input.email, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -200,7 +200,7 @@ export const createAssert = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -214,7 +214,7 @@ export const createAssert = (() => { ((Math.floor(input.age) === input.age && 0 <= input.age && input.age <= 4294967295) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -225,7 +225,7 @@ export const createAssert = (() => { _errorFactory, )) && (input.age < 100 || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -235,7 +235,7 @@ export const createAssert = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -246,7 +246,7 @@ export const createAssert = (() => { _errorFactory, )) && ("string" === typeof input.motto || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -257,7 +257,7 @@ export const createAssert = (() => { _errorFactory, )) && (input.birthdate instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -269,7 +269,7 @@ export const createAssert = (() => { )) && (null === input.died_at || input.died_at instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -281,7 +281,7 @@ export const createAssert = (() => { )) && (null === input.parent || ((("object" === typeof input.parent && null !== input.parent) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -291,8 +291,8 @@ export const createAssert = (() => { }, _errorFactory, )) && - $ao0(input.parent, _path + ".parent", true && _exceptionable)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -303,7 +303,7 @@ export const createAssert = (() => { _errorFactory, )) && (((Array.isArray(input.children) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -316,7 +316,7 @@ export const createAssert = (() => { input.children.every( (elem: any, _index2: number) => ((("object" === typeof elem && null !== elem) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -326,12 +326,12 @@ export const createAssert = (() => { }, _errorFactory, )) && - $ao0( + _ao0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -342,7 +342,7 @@ export const createAssert = (() => { _errorFactory, ), )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssert", @@ -353,7 +353,7 @@ export const createAssert = (() => { _errorFactory, )); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory: any; return ( input: any, @@ -363,7 +363,7 @@ export const createAssert = (() => { _errorFactory = errorFactory; ((input: any, _path: string, _exceptionable: boolean = true) => ((("object" === typeof input && null !== input) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( true, { method: "typia.createAssert", @@ -373,8 +373,8 @@ export const createAssert = (() => { }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { method: "typia.createAssert", @@ -389,7 +389,7 @@ export const createAssert = (() => { }; })(); export const createAssertEquals = (() => { - const $io0 = (input: any, _exceptionable: boolean = true): boolean => + const _io0 = (input: any, _exceptionable: boolean = true): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -411,13 +411,13 @@ export const createAssertEquals = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent, true && _exceptionable))) && + _io0(input.parent, true && _exceptionable))) && Array.isArray(input.children) && input.children.every( (elem: any, _index1: number) => "object" === typeof elem && null !== elem && - $io0(elem, true && _exceptionable), + _io0(elem, true && _exceptionable), ) && (9 === Object.keys(input).length || Object.keys(input).every((key: any) => { @@ -439,7 +439,7 @@ export const createAssertEquals = (() => { if (undefined === value) return true; return false; })); - const $ao0 = ( + const _ao0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -448,7 +448,7 @@ export const createAssertEquals = (() => { (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -458,7 +458,7 @@ export const createAssertEquals = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -470,7 +470,7 @@ export const createAssertEquals = (() => { )) && (("string" === typeof input.name && (RegExp("^[A-Z][a-z]+$").test(input.name) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -480,7 +480,7 @@ export const createAssertEquals = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -494,7 +494,7 @@ export const createAssertEquals = (() => { (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( input.email, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -504,7 +504,7 @@ export const createAssertEquals = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -518,7 +518,7 @@ export const createAssertEquals = (() => { ((Math.floor(input.age) === input.age && 0 <= input.age && input.age <= 4294967295) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -529,7 +529,7 @@ export const createAssertEquals = (() => { _errorFactory, )) && (input.age < 100 || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -539,7 +539,7 @@ export const createAssertEquals = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -550,7 +550,7 @@ export const createAssertEquals = (() => { _errorFactory, )) && ("string" === typeof input.motto || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -561,7 +561,7 @@ export const createAssertEquals = (() => { _errorFactory, )) && (input.birthdate instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -573,7 +573,7 @@ export const createAssertEquals = (() => { )) && (null === input.died_at || input.died_at instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -585,7 +585,7 @@ export const createAssertEquals = (() => { )) && (null === input.parent || ((("object" === typeof input.parent && null !== input.parent) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -595,8 +595,8 @@ export const createAssertEquals = (() => { }, _errorFactory, )) && - $ao0(input.parent, _path + ".parent", true && _exceptionable)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -607,7 +607,7 @@ export const createAssertEquals = (() => { _errorFactory, )) && (((Array.isArray(input.children) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -620,7 +620,7 @@ export const createAssertEquals = (() => { input.children.every( (elem: any, _index2: number) => ((("object" === typeof elem && null !== elem) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -630,12 +630,12 @@ export const createAssertEquals = (() => { }, _errorFactory, )) && - $ao0( + _ao0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -646,7 +646,7 @@ export const createAssertEquals = (() => { _errorFactory, ), )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", @@ -675,13 +675,13 @@ export const createAssertEquals = (() => { return true; const value = input[key]; if (undefined === value) return true; - return __typia_transform_$assertGuard.$assertGuard( + return __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertEquals", path: _path + - __typia_transform_$accessExpressionAsString.$accessExpressionAsString( + __typia_transform__accessExpressionAsString._accessExpressionAsString( key, ), expected: "undefined", @@ -694,7 +694,7 @@ export const createAssertEquals = (() => { input: any, _exceptionable: boolean = true, ): input is ICitizen => - "object" === typeof input && null !== input && $io0(input, true); + "object" === typeof input && null !== input && _io0(input, true); let _errorFactory: any; return ( input: any, @@ -704,7 +704,7 @@ export const createAssertEquals = (() => { _errorFactory = errorFactory; ((input: any, _path: string, _exceptionable: boolean = true) => ((("object" === typeof input && null !== input) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( true, { method: "typia.createAssertEquals", @@ -714,8 +714,8 @@ export const createAssertEquals = (() => { }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { method: "typia.createAssertEquals", @@ -730,7 +730,7 @@ export const createAssertEquals = (() => { }; })(); export const createAssertGuard = (() => { - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -752,12 +752,12 @@ export const createAssertGuard = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $ao0 = ( + const _ao0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -766,7 +766,7 @@ export const createAssertGuard = (() => { (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -776,7 +776,7 @@ export const createAssertGuard = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -788,7 +788,7 @@ export const createAssertGuard = (() => { )) && (("string" === typeof input.name && (RegExp("^[A-Z][a-z]+$").test(input.name) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -798,7 +798,7 @@ export const createAssertGuard = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -812,7 +812,7 @@ export const createAssertGuard = (() => { (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( input.email, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -822,7 +822,7 @@ export const createAssertGuard = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -836,7 +836,7 @@ export const createAssertGuard = (() => { ((Math.floor(input.age) === input.age && 0 <= input.age && input.age <= 4294967295) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -847,7 +847,7 @@ export const createAssertGuard = (() => { _errorFactory, )) && (input.age < 100 || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -857,7 +857,7 @@ export const createAssertGuard = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -868,7 +868,7 @@ export const createAssertGuard = (() => { _errorFactory, )) && ("string" === typeof input.motto || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -879,7 +879,7 @@ export const createAssertGuard = (() => { _errorFactory, )) && (input.birthdate instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -891,7 +891,7 @@ export const createAssertGuard = (() => { )) && (null === input.died_at || input.died_at instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -903,7 +903,7 @@ export const createAssertGuard = (() => { )) && (null === input.parent || ((("object" === typeof input.parent && null !== input.parent) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -913,8 +913,8 @@ export const createAssertGuard = (() => { }, _errorFactory, )) && - $ao0(input.parent, _path + ".parent", true && _exceptionable)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -925,7 +925,7 @@ export const createAssertGuard = (() => { _errorFactory, )) && (((Array.isArray(input.children) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -938,7 +938,7 @@ export const createAssertGuard = (() => { input.children.every( (elem: any, _index2: number) => ((("object" === typeof elem && null !== elem) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -948,12 +948,12 @@ export const createAssertGuard = (() => { }, _errorFactory, )) && - $ao0( + _ao0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -964,7 +964,7 @@ export const createAssertGuard = (() => { _errorFactory, ), )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuard", @@ -975,7 +975,7 @@ export const createAssertGuard = (() => { _errorFactory, )); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory: any; return ( input: any, @@ -985,7 +985,7 @@ export const createAssertGuard = (() => { _errorFactory = errorFactory; ((input: any, _path: string, _exceptionable: boolean = true) => ((("object" === typeof input && null !== input) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( true, { method: "typia.createAssertGuard", @@ -995,8 +995,8 @@ export const createAssertGuard = (() => { }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { method: "typia.createAssertGuard", @@ -1010,7 +1010,7 @@ export const createAssertGuard = (() => { }; })(); export const createAssertGuardEquals = (() => { - const $io0 = (input: any, _exceptionable: boolean = true): boolean => + const _io0 = (input: any, _exceptionable: boolean = true): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -1032,13 +1032,13 @@ export const createAssertGuardEquals = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent, true && _exceptionable))) && + _io0(input.parent, true && _exceptionable))) && Array.isArray(input.children) && input.children.every( (elem: any, _index1: number) => "object" === typeof elem && null !== elem && - $io0(elem, true && _exceptionable), + _io0(elem, true && _exceptionable), ) && (9 === Object.keys(input).length || Object.keys(input).every((key: any) => { @@ -1060,7 +1060,7 @@ export const createAssertGuardEquals = (() => { if (undefined === value) return true; return false; })); - const $ao0 = ( + const _ao0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -1069,7 +1069,7 @@ export const createAssertGuardEquals = (() => { (/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1079,7 +1079,7 @@ export const createAssertGuardEquals = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1091,7 +1091,7 @@ export const createAssertGuardEquals = (() => { )) && (("string" === typeof input.name && (RegExp("^[A-Z][a-z]+$").test(input.name) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1101,7 +1101,7 @@ export const createAssertGuardEquals = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1115,7 +1115,7 @@ export const createAssertGuardEquals = (() => { (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test( input.email, ) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1125,7 +1125,7 @@ export const createAssertGuardEquals = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1139,7 +1139,7 @@ export const createAssertGuardEquals = (() => { ((Math.floor(input.age) === input.age && 0 <= input.age && input.age <= 4294967295) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1150,7 +1150,7 @@ export const createAssertGuardEquals = (() => { _errorFactory, )) && (input.age < 100 || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1160,7 +1160,7 @@ export const createAssertGuardEquals = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1171,7 +1171,7 @@ export const createAssertGuardEquals = (() => { _errorFactory, )) && ("string" === typeof input.motto || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1182,7 +1182,7 @@ export const createAssertGuardEquals = (() => { _errorFactory, )) && (input.birthdate instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1194,7 +1194,7 @@ export const createAssertGuardEquals = (() => { )) && (null === input.died_at || input.died_at instanceof Date || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1206,7 +1206,7 @@ export const createAssertGuardEquals = (() => { )) && (null === input.parent || ((("object" === typeof input.parent && null !== input.parent) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1216,8 +1216,8 @@ export const createAssertGuardEquals = (() => { }, _errorFactory, )) && - $ao0(input.parent, _path + ".parent", true && _exceptionable)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input.parent, _path + ".parent", true && _exceptionable)) || + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1228,7 +1228,7 @@ export const createAssertGuardEquals = (() => { _errorFactory, )) && (((Array.isArray(input.children) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1241,7 +1241,7 @@ export const createAssertGuardEquals = (() => { input.children.every( (elem: any, _index2: number) => ((("object" === typeof elem && null !== elem) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1251,12 +1251,12 @@ export const createAssertGuardEquals = (() => { }, _errorFactory, )) && - $ao0( + _ao0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1267,7 +1267,7 @@ export const createAssertGuardEquals = (() => { _errorFactory, ), )) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", @@ -1296,13 +1296,13 @@ export const createAssertGuardEquals = (() => { return true; const value = input[key]; if (undefined === value) return true; - return __typia_transform_$assertGuard.$assertGuard( + return __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.createAssertGuardEquals", path: _path + - __typia_transform_$accessExpressionAsString.$accessExpressionAsString( + __typia_transform__accessExpressionAsString._accessExpressionAsString( key, ), expected: "undefined", @@ -1315,7 +1315,7 @@ export const createAssertGuardEquals = (() => { input: any, _exceptionable: boolean = true, ): input is ICitizen => - "object" === typeof input && null !== input && $io0(input, true); + "object" === typeof input && null !== input && _io0(input, true); let _errorFactory: any; return ( input: any, @@ -1325,7 +1325,7 @@ export const createAssertGuardEquals = (() => { _errorFactory = errorFactory; ((input: any, _path: string, _exceptionable: boolean = true) => ((("object" === typeof input && null !== input) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( true, { method: "typia.createAssertGuardEquals", @@ -1335,8 +1335,8 @@ export const createAssertGuardEquals = (() => { }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { method: "typia.createAssertGuardEquals", @@ -1350,7 +1350,7 @@ export const createAssertGuardEquals = (() => { }; })(); export const createValidate = (() => { - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -1372,12 +1372,12 @@ export const createValidate = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent))) && + _io0(input.parent))) && Array.isArray(input.children) && input.children.every( - (elem: any) => "object" === typeof elem && null !== elem && $io0(elem), + (elem: any) => "object" === typeof elem && null !== elem && _io0(elem), ); - const $vo0 = ( + const _vo0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -1469,7 +1469,7 @@ export const createValidate = (() => { expected: "(ICitizen | null)", value: input.parent, })) && - $vo0(input.parent, _path + ".parent", true && _exceptionable)) || + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || $report(_exceptionable, { path: _path + ".parent", expected: "(ICitizen | null)", @@ -1490,7 +1490,7 @@ export const createValidate = (() => { expected: "ICitizen", value: elem, })) && - $vo0( + _vo0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, @@ -1509,13 +1509,13 @@ export const createValidate = (() => { }), ].every((flag: boolean) => flag); const __is = (input: any): input is ICitizen => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let errors: any; let $report: any; return (input: any): import("typia").IValidation => { if (false === __is(input)) { errors = []; - $report = (__typia_transform_$validateReport.$validateReport as any)( + $report = (__typia_transform__validateReport._validateReport as any)( errors, ); ((input: any, _path: string, _exceptionable: boolean = true) => @@ -1525,7 +1525,7 @@ export const createValidate = (() => { expected: "ICitizen", value: input, })) && - $vo0(input, _path + "", true)) || + _vo0(input, _path + "", true)) || $report(true, { path: _path + "", expected: "ICitizen", @@ -1546,7 +1546,7 @@ export const createValidate = (() => { }; })(); export const createValidateEquals = (() => { - const $io0 = (input: any, _exceptionable: boolean = true): boolean => + const _io0 = (input: any, _exceptionable: boolean = true): boolean => "string" === typeof input.id && /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i.test( input.id, @@ -1568,13 +1568,13 @@ export const createValidateEquals = (() => { (null === input.parent || ("object" === typeof input.parent && null !== input.parent && - $io0(input.parent, true && _exceptionable))) && + _io0(input.parent, true && _exceptionable))) && Array.isArray(input.children) && input.children.every( (elem: any, _index1: number) => "object" === typeof elem && null !== elem && - $io0(elem, true && _exceptionable), + _io0(elem, true && _exceptionable), ) && (9 === Object.keys(input).length || Object.keys(input).every((key: any) => { @@ -1596,7 +1596,7 @@ export const createValidateEquals = (() => { if (undefined === value) return true; return false; })); - const $vo0 = ( + const _vo0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -1688,7 +1688,7 @@ export const createValidateEquals = (() => { expected: "(ICitizen | null)", value: input.parent, })) && - $vo0(input.parent, _path + ".parent", true && _exceptionable)) || + _vo0(input.parent, _path + ".parent", true && _exceptionable)) || $report(_exceptionable, { path: _path + ".parent", expected: "(ICitizen | null)", @@ -1709,7 +1709,7 @@ export const createValidateEquals = (() => { expected: "ICitizen", value: elem, })) && - $vo0( + _vo0( elem, _path + ".children[" + _index2 + "]", true && _exceptionable, @@ -1749,7 +1749,7 @@ export const createValidateEquals = (() => { return $report(_exceptionable, { path: _path + - __typia_transform_$accessExpressionAsString.$accessExpressionAsString( + __typia_transform__accessExpressionAsString._accessExpressionAsString( key, ), expected: "undefined", @@ -1762,13 +1762,13 @@ export const createValidateEquals = (() => { input: any, _exceptionable: boolean = true, ): input is ICitizen => - "object" === typeof input && null !== input && $io0(input, true); + "object" === typeof input && null !== input && _io0(input, true); let errors: any; let $report: any; return (input: any): import("typia").IValidation => { if (false === __is(input)) { errors = []; - $report = (__typia_transform_$validateReport.$validateReport as any)( + $report = (__typia_transform__validateReport._validateReport as any)( errors, ); ((input: any, _path: string, _exceptionable: boolean = true) => @@ -1778,7 +1778,7 @@ export const createValidateEquals = (() => { expected: "ICitizen", value: input, })) && - $vo0(input, _path + "", true)) || + _vo0(input, _path + "", true)) || $report(true, { path: _path + "", expected: "ICitizen", @@ -1799,54 +1799,54 @@ export const createValidateEquals = (() => { }; })(); export const createRandom = (() => { - const $ro0 = (_recursive: boolean = true, _depth: number = 0): any => ({ + const _ro0 = (_recursive: boolean = true, _depth: number = 0): any => ({ id: ( - _generator?.uuid ?? __typia_transform_$randomFormatUuid.$randomFormatUuid + _generator?.uuid ?? __typia_transform__randomFormatUuid._randomFormatUuid )(), name: ( - _generator?.pattern ?? __typia_transform_$randomPattern.$randomPattern + _generator?.pattern ?? __typia_transform__randomPattern._randomPattern )(new RegExp("^[A-Z][a-z]+$")), email: ( _generator?.email ?? - __typia_transform_$randomFormatEmail.$randomFormatEmail + __typia_transform__randomFormatEmail._randomFormatEmail )(), age: ( - _generator?.integer ?? __typia_transform_$randomInteger.$randomInteger + _generator?.integer ?? __typia_transform__randomInteger._randomInteger )({ type: "integer", exclusiveMaximum: true, maximum: 100, }), motto: ( - _generator?.string ?? __typia_transform_$randomString.$randomString + _generator?.string ?? __typia_transform__randomString._randomString )({ type: "string", }), birthdate: new Date( ( _generator?.datetime ?? - __typia_transform_$randomFormatDatetime.$randomFormatDatetime + __typia_transform__randomFormatDatetime._randomFormatDatetime )(), ), - died_at: __typia_transform_$randomPick.$randomPick([ + died_at: __typia_transform__randomPick._randomPick([ () => null, () => new Date( ( _generator?.datetime ?? - __typia_transform_$randomFormatDatetime.$randomFormatDatetime + __typia_transform__randomFormatDatetime._randomFormatDatetime )(), ), ])(), - parent: __typia_transform_$randomPick.$randomPick([ + parent: __typia_transform__randomPick._randomPick([ () => null, - () => $ro0(true, _recursive ? 1 + _depth : _depth), + () => _ro0(true, _recursive ? 1 + _depth : _depth), ])(), children: 5 >= _depth - ? (_generator?.array ?? __typia_transform_$randomArray.$randomArray)({ + ? (_generator?.array ?? __typia_transform__randomArray._randomArray)({ type: "array", - element: () => $ro0(true, _recursive ? 1 + _depth : _depth), + element: () => _ro0(true, _recursive ? 1 + _depth : _depth), }) : [], }); @@ -1855,6 +1855,6 @@ export const createRandom = (() => { generator?: Partial, ): import("typia").Resolved => { _generator = generator; - return $ro0(); + return _ro0(); }; })(); diff --git a/test/generate/output/generate_protobuf.ts b/test/generate/output/generate_protobuf.ts index c22eba57cb..ee3fde35a3 100644 --- a/test/generate/output/generate_protobuf.ts +++ b/test/generate/output/generate_protobuf.ts @@ -1,9 +1,9 @@ import typia, { tags } from "typia"; -import * as __typia_transform_$ProtobufReader from "typia/lib/internal/$ProtobufReader.js"; -import * as __typia_transform_$ProtobufSizer from "typia/lib/internal/$ProtobufSizer.js"; -import * as __typia_transform_$ProtobufWriter from "typia/lib/internal/$ProtobufWriter.js"; -import * as __typia_transform_$assertGuard from "typia/lib/internal/$assertGuard.js"; -import * as __typia_transform_$validateReport from "typia/lib/internal/$validateReport.js"; +import * as __typia_transform__ProtobufReader from "typia/lib/internal/_ProtobufReader.js"; +import * as __typia_transform__ProtobufSizer from "typia/lib/internal/_ProtobufSizer.js"; +import * as __typia_transform__ProtobufWriter from "typia/lib/internal/_ProtobufWriter.js"; +import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js"; +import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js"; interface IFile { name: string & tags.MaxLength<8>; @@ -14,12 +14,12 @@ interface IFile { export const createEncode = (() => { const encoder = < Writer extends - import("typia/lib/internal/$IProtobufWriter.js").$IProtobufWriter, + import("typia/lib/internal/_IProtobufWriter.js")._IProtobufWriter, >( writer: Writer, input: any, ): Writer => { - const $peo0 = (input: any): any => { + const _peo0 = (input: any): any => { // property "name": (string & MaxLength<8>); writer.uint32(10); writer.string(input.name); @@ -35,23 +35,23 @@ export const createEncode = (() => { writer.uint32(34); writer.bytes(input.data); }; - $peo0(input); + _peo0(input); return writer; }; return (input: IFile): Uint8Array => { const sizer = encoder( - new __typia_transform_$ProtobufSizer.$ProtobufSizer(), + new __typia_transform__ProtobufSizer._ProtobufSizer(), input, ); const writer = encoder( - new __typia_transform_$ProtobufWriter.$ProtobufWriter(sizer), + new __typia_transform__ProtobufWriter._ProtobufWriter(sizer), input, ); return writer.buffer(); }; })(); export const createAssertEncode = (() => { - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.name && input.name.length <= 8 && (null === input.extension || @@ -63,14 +63,14 @@ export const createAssertEncode = (() => { 0 <= input.size && input.size <= 4294967295 && input.data instanceof Uint8Array; - const $ao0 = ( + const _ao0 = ( input: any, _path: string, _exceptionable: boolean = true, ): boolean => (("string" === typeof input.name && (input.name.length <= 8 || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.protobuf.createAssertEncode", @@ -80,7 +80,7 @@ export const createAssertEncode = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.protobuf.createAssertEncode", @@ -93,7 +93,7 @@ export const createAssertEncode = (() => { (null === input.extension || ("string" === typeof input.extension && (1 <= input.extension.length || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.protobuf.createAssertEncode", @@ -104,7 +104,7 @@ export const createAssertEncode = (() => { _errorFactory, )) && (input.extension.length <= 3 || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.protobuf.createAssertEncode", @@ -114,7 +114,7 @@ export const createAssertEncode = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.protobuf.createAssertEncode", @@ -128,7 +128,7 @@ export const createAssertEncode = (() => { ((Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.protobuf.createAssertEncode", @@ -138,7 +138,7 @@ export const createAssertEncode = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.protobuf.createAssertEncode", @@ -149,7 +149,7 @@ export const createAssertEncode = (() => { _errorFactory, )) && (input.data instanceof Uint8Array || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.protobuf.createAssertEncode", @@ -161,12 +161,12 @@ export const createAssertEncode = (() => { )); const encoder = < Writer extends - import("typia/lib/internal/$IProtobufWriter.js").$IProtobufWriter, + import("typia/lib/internal/_IProtobufWriter.js")._IProtobufWriter, >( writer: Writer, input: any, ): Writer => { - const $peo0 = (input: any): any => { + const _peo0 = (input: any): any => { // property "name": (string & MaxLength<8>); writer.uint32(10); writer.string(input.name); @@ -182,7 +182,7 @@ export const createAssertEncode = (() => { writer.uint32(34); writer.bytes(input.data); }; - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.name && input.name.length <= 8 && (null === input.extension || @@ -194,11 +194,11 @@ export const createAssertEncode = (() => { 0 <= input.size && input.size <= 4294967295 && input.data instanceof Uint8Array; - $peo0(input); + _peo0(input); return writer; }; const __is = (input: any): input is IFile => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory: any; const __assert = ( input: any, @@ -208,7 +208,7 @@ export const createAssertEncode = (() => { _errorFactory = errorFactory; ((input: any, _path: string, _exceptionable: boolean = true) => ((("object" === typeof input && null !== input) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( true, { method: "typia.protobuf.createAssertEncode", @@ -218,8 +218,8 @@ export const createAssertEncode = (() => { }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { method: "typia.protobuf.createAssertEncode", @@ -234,11 +234,11 @@ export const createAssertEncode = (() => { }; const __encode = (input: IFile): Uint8Array => { const sizer = encoder( - new __typia_transform_$ProtobufSizer.$ProtobufSizer(), + new __typia_transform__ProtobufSizer._ProtobufSizer(), input, ); const writer = encoder( - new __typia_transform_$ProtobufWriter.$ProtobufWriter(sizer), + new __typia_transform__ProtobufWriter._ProtobufWriter(sizer), input, ); return writer.buffer(); @@ -249,7 +249,7 @@ export const createAssertEncode = (() => { ): Uint8Array => __encode(__assert(input, errorFactory)); })(); export const createIsEncode = (() => { - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.name && input.name.length <= 8 && (null === input.extension || @@ -263,12 +263,12 @@ export const createIsEncode = (() => { input.data instanceof Uint8Array; const encoder = < Writer extends - import("typia/lib/internal/$IProtobufWriter.js").$IProtobufWriter, + import("typia/lib/internal/_IProtobufWriter.js")._IProtobufWriter, >( writer: Writer, input: any, ): Writer => { - const $peo0 = (input: any): any => { + const _peo0 = (input: any): any => { // property "name": (string & MaxLength<8>); writer.uint32(10); writer.string(input.name); @@ -284,7 +284,7 @@ export const createIsEncode = (() => { writer.uint32(34); writer.bytes(input.data); }; - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.name && input.name.length <= 8 && (null === input.extension || @@ -296,18 +296,18 @@ export const createIsEncode = (() => { 0 <= input.size && input.size <= 4294967295 && input.data instanceof Uint8Array; - $peo0(input); + _peo0(input); return writer; }; const __is = (input: any): input is IFile => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); const __encode = (input: IFile): Uint8Array => { const sizer = encoder( - new __typia_transform_$ProtobufSizer.$ProtobufSizer(), + new __typia_transform__ProtobufSizer._ProtobufSizer(), input, ); const writer = encoder( - new __typia_transform_$ProtobufWriter.$ProtobufWriter(sizer), + new __typia_transform__ProtobufWriter._ProtobufWriter(sizer), input, ); return writer.buffer(); @@ -316,7 +316,7 @@ export const createIsEncode = (() => { __is(input) ? __encode(input) : null; })(); export const createValidateEncode = (() => { - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.name && input.name.length <= 8 && (null === input.extension || @@ -328,7 +328,7 @@ export const createValidateEncode = (() => { 0 <= input.size && input.size <= 4294967295 && input.data instanceof Uint8Array; - const $vo0 = ( + const _vo0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -388,12 +388,12 @@ export const createValidateEncode = (() => { ].every((flag: boolean) => flag); const encoder = < Writer extends - import("typia/lib/internal/$IProtobufWriter.js").$IProtobufWriter, + import("typia/lib/internal/_IProtobufWriter.js")._IProtobufWriter, >( writer: Writer, input: any, ): Writer => { - const $peo0 = (input: any): any => { + const _peo0 = (input: any): any => { // property "name": (string & MaxLength<8>); writer.uint32(10); writer.string(input.name); @@ -409,7 +409,7 @@ export const createValidateEncode = (() => { writer.uint32(34); writer.bytes(input.data); }; - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.name && input.name.length <= 8 && (null === input.extension || @@ -421,17 +421,17 @@ export const createValidateEncode = (() => { 0 <= input.size && input.size <= 4294967295 && input.data instanceof Uint8Array; - $peo0(input); + _peo0(input); return writer; }; const __is = (input: any): input is IFile => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let errors: any; let $report: any; const __validate = (input: any): import("typia").IValidation => { if (false === __is(input)) { errors = []; - $report = (__typia_transform_$validateReport.$validateReport as any)( + $report = (__typia_transform__validateReport._validateReport as any)( errors, ); ((input: any, _path: string, _exceptionable: boolean = true) => @@ -441,7 +441,7 @@ export const createValidateEncode = (() => { expected: "IFile", value: input, })) && - $vo0(input, _path + "", true)) || + _vo0(input, _path + "", true)) || $report(true, { path: _path + "", expected: "IFile", @@ -462,11 +462,11 @@ export const createValidateEncode = (() => { }; const __encode = (input: IFile): Uint8Array => { const sizer = encoder( - new __typia_transform_$ProtobufSizer.$ProtobufSizer(), + new __typia_transform__ProtobufSizer._ProtobufSizer(), input, ); const writer = encoder( - new __typia_transform_$ProtobufWriter.$ProtobufWriter(sizer), + new __typia_transform__ProtobufWriter._ProtobufWriter(sizer), input, ); return writer.buffer(); @@ -478,7 +478,7 @@ export const createValidateEncode = (() => { }; })(); export const createDecode = (() => { - const $pdo0 = (reader: any, length: number = -1): any => { + const _pdo0 = (reader: any, length: number = -1): any => { length = length < 0 ? reader.size() : reader.index() + length; const output = { name: "" as any, @@ -513,12 +513,12 @@ export const createDecode = (() => { return output; }; return (input: Uint8Array): import("typia").Resolved => { - const reader = new __typia_transform_$ProtobufReader.$ProtobufReader(input); - return $pdo0(reader); + const reader = new __typia_transform__ProtobufReader._ProtobufReader(input); + return _pdo0(reader); }; })(); export const createAssertDecode = (() => { - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.name && input.name.length <= 8 && (null === input.extension || @@ -530,14 +530,14 @@ export const createAssertDecode = (() => { 0 <= input.size && input.size <= 4294967295 && input.data instanceof Uint8Array; - const $ao0 = ( + const _ao0 = ( input: any, _path: string, _exceptionable: boolean = true, ): boolean => (("string" === typeof input.name && (input.name.length <= 8 || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.protobuf.createAssertDecode", @@ -547,7 +547,7 @@ export const createAssertDecode = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.protobuf.createAssertDecode", @@ -560,7 +560,7 @@ export const createAssertDecode = (() => { (null === input.extension || ("string" === typeof input.extension && (1 <= input.extension.length || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.protobuf.createAssertDecode", @@ -571,7 +571,7 @@ export const createAssertDecode = (() => { _errorFactory, )) && (input.extension.length <= 3 || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.protobuf.createAssertDecode", @@ -581,7 +581,7 @@ export const createAssertDecode = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.protobuf.createAssertDecode", @@ -595,7 +595,7 @@ export const createAssertDecode = (() => { ((Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.protobuf.createAssertDecode", @@ -605,7 +605,7 @@ export const createAssertDecode = (() => { }, _errorFactory, ))) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.protobuf.createAssertDecode", @@ -616,7 +616,7 @@ export const createAssertDecode = (() => { _errorFactory, )) && (input.data instanceof Uint8Array || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( _exceptionable, { method: "typia.protobuf.createAssertDecode", @@ -626,7 +626,7 @@ export const createAssertDecode = (() => { }, _errorFactory, )); - const $pdo0 = (reader: any, length: number = -1): any => { + const _pdo0 = (reader: any, length: number = -1): any => { length = length < 0 ? reader.size() : reader.index() + length; const output = { name: "" as any, @@ -661,7 +661,7 @@ export const createAssertDecode = (() => { return output; }; const __is = (input: any): input is IFile => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let _errorFactory: any; const __assert = ( input: any, @@ -671,7 +671,7 @@ export const createAssertDecode = (() => { _errorFactory = errorFactory; ((input: any, _path: string, _exceptionable: boolean = true) => ((("object" === typeof input && null !== input) || - __typia_transform_$assertGuard.$assertGuard( + __typia_transform__assertGuard._assertGuard( true, { method: "typia.protobuf.createAssertDecode", @@ -681,8 +681,8 @@ export const createAssertDecode = (() => { }, _errorFactory, )) && - $ao0(input, _path + "", true)) || - __typia_transform_$assertGuard.$assertGuard( + _ao0(input, _path + "", true)) || + __typia_transform__assertGuard._assertGuard( true, { method: "typia.protobuf.createAssertDecode", @@ -696,8 +696,8 @@ export const createAssertDecode = (() => { return input; }; const __decode = (input: Uint8Array): import("typia").Resolved => { - const reader = new __typia_transform_$ProtobufReader.$ProtobufReader(input); - return $pdo0(reader); + const reader = new __typia_transform__ProtobufReader._ProtobufReader(input); + return _pdo0(reader); }; return ( input: Uint8Array, @@ -705,7 +705,7 @@ export const createAssertDecode = (() => { ): import("typia").Resolved => __assert(__decode(input), errorFactory); })(); export const createIsDecode = (() => { - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.name && input.name.length <= 8 && (null === input.extension || @@ -717,7 +717,7 @@ export const createIsDecode = (() => { 0 <= input.size && input.size <= 4294967295 && input.data instanceof Uint8Array; - const $pdo0 = (reader: any, length: number = -1): any => { + const _pdo0 = (reader: any, length: number = -1): any => { length = length < 0 ? reader.size() : reader.index() + length; const output = { name: "" as any, @@ -752,10 +752,10 @@ export const createIsDecode = (() => { return output; }; const __is = (input: any): input is IFile => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); const __decode = (input: Uint8Array): import("typia").Resolved => { - const reader = new __typia_transform_$ProtobufReader.$ProtobufReader(input); - return $pdo0(reader); + const reader = new __typia_transform__ProtobufReader._ProtobufReader(input); + return _pdo0(reader); }; return (input: Uint8Array): import("typia").Resolved | null => { const value = __decode(input); @@ -764,7 +764,7 @@ export const createIsDecode = (() => { }; })(); export const createValidateDecode = (() => { - const $io0 = (input: any): boolean => + const _io0 = (input: any): boolean => "string" === typeof input.name && input.name.length <= 8 && (null === input.extension || @@ -776,7 +776,7 @@ export const createValidateDecode = (() => { 0 <= input.size && input.size <= 4294967295 && input.data instanceof Uint8Array; - const $vo0 = ( + const _vo0 = ( input: any, _path: string, _exceptionable: boolean = true, @@ -834,7 +834,7 @@ export const createValidateDecode = (() => { value: input.data, }), ].every((flag: boolean) => flag); - const $pdo0 = (reader: any, length: number = -1): any => { + const _pdo0 = (reader: any, length: number = -1): any => { length = length < 0 ? reader.size() : reader.index() + length; const output = { name: "" as any, @@ -869,13 +869,13 @@ export const createValidateDecode = (() => { return output; }; const __is = (input: any): input is IFile => - "object" === typeof input && null !== input && $io0(input); + "object" === typeof input && null !== input && _io0(input); let errors: any; let $report: any; const __validate = (input: any): import("typia").IValidation => { if (false === __is(input)) { errors = []; - $report = (__typia_transform_$validateReport.$validateReport as any)( + $report = (__typia_transform__validateReport._validateReport as any)( errors, ); ((input: any, _path: string, _exceptionable: boolean = true) => @@ -885,7 +885,7 @@ export const createValidateDecode = (() => { expected: "IFile", value: input, })) && - $vo0(input, _path + "", true)) || + _vo0(input, _path + "", true)) || $report(true, { path: _path + "", expected: "IFile", @@ -905,8 +905,8 @@ export const createValidateDecode = (() => { } as any; }; const __decode = (input: Uint8Array): import("typia").Resolved => { - const reader = new __typia_transform_$ProtobufReader.$ProtobufReader(input); - return $pdo0(reader); + const reader = new __typia_transform__ProtobufReader._ProtobufReader(input); + return _pdo0(reader); }; return ( input: Uint8Array, diff --git a/test/package.json b/test/package.json index f7341328d2..c00d53c09e 100644 --- a/test/package.json +++ b/test/package.json @@ -53,6 +53,6 @@ "suppress-warnings": "^1.0.2", "tstl": "^3.0.0", "uuid": "^9.0.1", - "typia": "../typia-7.0.0-dev.20241022-3.tgz" + "typia": "../typia-7.0.0-dev.20241022-4.tgz" } } \ No newline at end of file diff --git a/test/src/debug/is.ts b/test/src/debug/is.ts new file mode 100644 index 0000000000..d25ab6f104 --- /dev/null +++ b/test/src/debug/is.ts @@ -0,0 +1,12 @@ +import typia from "typia"; + +import { CommentTagFormat } from "../structures/CommentTagFormat"; + +const is = typia.createIs(); +console.log(is(CommentTagFormat.generate())); + +for (const spoiler of CommentTagFormat.SPOILERS) { + const value: CommentTagFormat = CommentTagFormat.generate(); + spoiler(value); + console.log(is(value)); +} diff --git a/test/src/debug/message.ts b/test/src/debug/message.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/src/helpers/TestRandomGenerator.ts b/test/src/helpers/TestRandomGenerator.ts index 80541a6da4..26bf7d2fec 100644 --- a/test/src/helpers/TestRandomGenerator.ts +++ b/test/src/helpers/TestRandomGenerator.ts @@ -1,6 +1,6 @@ import RandExp from "randexp"; import { back_inserter, ranges } from "tstl"; -import { $randomFormatDuration } from "typia/lib/internal/$randomFormatDuration"; +import { _randomFormatDuration } from "typia/lib/internal/_randomFormatDuration"; export namespace TestRandomGenerator { const ALPHABETS = "abcdefghijklmnopqrstuvwxyz"; @@ -88,7 +88,7 @@ export namespace TestRandomGenerator { return new Date(number(min, max)).toISOString(); }; - export const duration = () => $randomFormatDuration(); + export const duration = () => _randomFormatDuration(); } const DAY = 1000 * 60 * 60 * 24; diff --git a/test/src/structures/TypeTagCustom.ts b/test/src/structures/TypeTagCustom.ts index fe655b4abc..97b51197a0 100644 --- a/test/src/structures/TypeTagCustom.ts +++ b/test/src/structures/TypeTagCustom.ts @@ -1,6 +1,6 @@ import typia, { IRandomGenerator } from "typia"; -import { $randomNumber } from "typia/lib/internal/$randomNumber"; -import { $randomString } from "typia/lib/internal/$randomString"; +import { _randomNumber } from "typia/lib/internal/_randomNumber"; +import { _randomString } from "typia/lib/internal/_randomString"; import { v4 } from "uuid"; import { Spoiler } from "../helpers/Spoiler"; @@ -49,14 +49,14 @@ export namespace TypeTagCustom { return ( TestRandomGenerator.string() + (schema as any)["x-typia-postfix"] ); - return $randomString(schema); + return _randomString(schema); }, number: (schema) => { if ((schema as any)["x-typia-powerOf"] !== undefined) { const powerOf = (schema as any)["x-typia-powerOf"]; return Math.pow(powerOf, TestRandomGenerator.integer(1, 10)); } - return $randomNumber(schema); + return _randomNumber(schema); }, }; } diff --git a/test/src/structures/TypeTagFormat.ts b/test/src/structures/TypeTagFormat.ts index 0b2c819a6a..0f03ed65ae 100644 --- a/test/src/structures/TypeTagFormat.ts +++ b/test/src/structures/TypeTagFormat.ts @@ -1,7 +1,7 @@ import crypto from "crypto"; import { tags } from "typia"; -import { $randomFormatIpv4 } from "typia/lib/internal/$randomFormatIpv4"; -import { $randomFormatIpv6 } from "typia/lib/internal/$randomFormatIpv6"; +import { _randomFormatIpv4 } from "typia/lib/internal/_randomFormatIpv4"; +import { _randomFormatIpv6 } from "typia/lib/internal/_randomFormatIpv6"; import { v4 } from "uuid"; import { Spoiler } from "../helpers/Spoiler"; @@ -112,14 +112,14 @@ export namespace TypeTagFormat { input.iriReference = "/네스티아"; return ["$input.iriReference"]; }, - ...[$randomFormatIpv6(), "127.0.0.1234", "github.com"].map( + ...[_randomFormatIpv6(), "127.0.0.1234", "github.com"].map( (ipv4) => (input: TypeTagFormat) => { input.ipv4 = ipv4; return ["$input.ipv4"]; }, ), (input) => { - input.ipv6 = $randomFormatIpv4(); + input.ipv6 = _randomFormatIpv4(); return ["$input.ipv6"]; }, ...["github.com", "http://깃허브.com", "/abc"].map(