From 514f571fba65353231367481fb709bee9e03dc78 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Tue, 17 Sep 2024 02:49:09 +0900 Subject: [PATCH] Complete principle functions. --- benchmark/package.json | 2 +- debug/package.json | 2 +- debug/src/llm.schema.recursive.ts | 5 ----- debug/src/stringify.ts | 3 +++ errors/package.json | 2 +- packages/typescript-json/package.json | 4 ++-- src/programmers/json/JsonIsStringifyProgrammer.ts | 4 +--- src/programmers/json/JsonStringifyProgrammer.ts | 6 ++---- .../features/json/JsonCreateIsStringifyTransformer.ts | 4 ++-- test-esm/package.json | 2 +- test/package.json | 2 +- 11 files changed, 15 insertions(+), 21 deletions(-) delete mode 100644 debug/src/llm.schema.recursive.ts create mode 100644 debug/src/stringify.ts diff --git a/benchmark/package.json b/benchmark/package.json index 5c707397e4..1ff049be78 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-6.10.0.tgz" + "typia": "../typia-7.0.0-dev.20240916.tgz" } } \ No newline at end of file diff --git a/debug/package.json b/debug/package.json index dd7f5b93ea..9866d367b1 100644 --- a/debug/package.json +++ b/debug/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "tstl": "^3.0.0", - "typia": "../typia-6.10.0-dev.20240910-2.tgz", + "typia": "../typia-7.0.0-dev.20240916.tgz", "uuid": "^10.0.0" } } \ No newline at end of file diff --git a/debug/src/llm.schema.recursive.ts b/debug/src/llm.schema.recursive.ts deleted file mode 100644 index 9a59fba685..0000000000 --- a/debug/src/llm.schema.recursive.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ILlmSchema } from "@samchon/openapi"; -import typia from "typia"; - -const schema: ILlmSchema = typia.llm.schema(); -console.log(schema); diff --git a/debug/src/stringify.ts b/debug/src/stringify.ts new file mode 100644 index 0000000000..6e6b6f0d6f --- /dev/null +++ b/debug/src/stringify.ts @@ -0,0 +1,3 @@ +import typia from "typia"; + +console.log(typia.json.createIsStringify().toString()); diff --git a/errors/package.json b/errors/package.json index 8178eef9ad..47909c65b3 100644 --- a/errors/package.json +++ b/errors/package.json @@ -32,6 +32,6 @@ "typescript": "^5.3.2" }, "dependencies": { - "typia": "../typia-6.10.0.tgz" + "typia": "../typia-7.0.0-dev.20240916.tgz" } } \ No newline at end of file diff --git a/packages/typescript-json/package.json b/packages/typescript-json/package.json index 21e0ff4527..b9392e4b2c 100644 --- a/packages/typescript-json/package.json +++ b/packages/typescript-json/package.json @@ -1,6 +1,6 @@ { "name": "typescript-json", - "version": "6.10.0", + "version": "7.0.0-dev.20240916", "description": "Superfast runtime validators with only one line", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -63,7 +63,7 @@ }, "homepage": "https://typia.io", "dependencies": { - "typia": "6.10.0" + "typia": "7.0.0-dev.20240916" }, "peerDependencies": { "typescript": ">=4.8.0 <5.7.0" diff --git a/src/programmers/json/JsonIsStringifyProgrammer.ts b/src/programmers/json/JsonIsStringifyProgrammer.ts index 21e87e8938..c1947fefba 100644 --- a/src/programmers/json/JsonIsStringifyProgrammer.ts +++ b/src/programmers/json/JsonIsStringifyProgrammer.ts @@ -90,10 +90,8 @@ export namespace JsonIsStringifyProgrammer { props.modulo.getText(), ); const result: FeatureProgrammer.IDecomposed = decompose({ - context: props.context, + ...props, importer, - type: props.type, - name: props.name, }); return FeatureProgrammer.writeDecomposed({ modulo: props.modulo, diff --git a/src/programmers/json/JsonStringifyProgrammer.ts b/src/programmers/json/JsonStringifyProgrammer.ts index 6b69d94ff2..b733193936 100644 --- a/src/programmers/json/JsonStringifyProgrammer.ts +++ b/src/programmers/json/JsonStringifyProgrammer.ts @@ -39,8 +39,8 @@ export namespace JsonStringifyProgrammer { WRITER ----------------------------------------------------------- */ export const decompose = (props: { - context: ITypiaContext; validated: boolean; + context: ITypiaContext; importer: FunctionImporter; type: ts.Type; name: string | undefined; @@ -76,11 +76,9 @@ export namespace JsonStringifyProgrammer { props.modulo.getText(), ); const result: FeatureProgrammer.IDecomposed = decompose({ + ...props, validated: false, - context: props.context, importer, - type: props.type, - name: props.name, }); return FeatureProgrammer.writeDecomposed({ modulo: props.modulo, diff --git a/src/transformers/features/json/JsonCreateIsStringifyTransformer.ts b/src/transformers/features/json/JsonCreateIsStringifyTransformer.ts index 2192226d4a..20013fa6de 100644 --- a/src/transformers/features/json/JsonCreateIsStringifyTransformer.ts +++ b/src/transformers/features/json/JsonCreateIsStringifyTransformer.ts @@ -1,4 +1,4 @@ -import { JsonStringifyProgrammer } from "../../../programmers/json/JsonStringifyProgrammer"; +import { JsonIsStringifyProgrammer } from "../../../programmers/json/JsonIsStringifyProgrammer"; import { ITransformProps } from "../../ITransformProps"; import { GenericTransformer } from "../../internal/GenericTransformer"; @@ -8,6 +8,6 @@ export namespace JsonCreateIsStringifyTransformer { GenericTransformer.factory({ ...props, method: "json.stringify", - write: JsonStringifyProgrammer.write, + write: JsonIsStringifyProgrammer.write, }); } diff --git a/test-esm/package.json b/test-esm/package.json index e836d8530f..ced80287c4 100644 --- a/test-esm/package.json +++ b/test-esm/package.json @@ -36,6 +36,6 @@ "typescript": "^5.4.5" }, "dependencies": { - "typia": "../typia-6.10.0.tgz" + "typia": "../typia-7.0.0-dev.20240916.tgz" } } \ No newline at end of file diff --git a/test/package.json b/test/package.json index 080f193f67..f14c5f319a 100644 --- a/test/package.json +++ b/test/package.json @@ -52,6 +52,6 @@ "suppress-warnings": "^1.0.2", "tstl": "^3.0.0", "uuid": "^9.0.1", - "typia": "../typia-6.10.0.tgz" + "typia": "../typia-7.0.0-dev.20240916.tgz" } } \ No newline at end of file