From 9fe30d62764269d5919e10ecfb7c07c177f99817 Mon Sep 17 00:00:00 2001 From: Nathan J Adams Date: Tue, 29 Oct 2024 01:38:57 +0000 Subject: [PATCH] Cli bugfix (#16) bugfix --- package.json | 2 +- src/cli/generate.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e551c9e..da74935 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "json-schema-typescript-generator", - "version": "2.2.0", + "version": "2.2.1", "author": { "name": "Nathan Adams", "url": "https://github.com/NathanJAdams" diff --git a/src/cli/generate.ts b/src/cli/generate.ts index c47efea..d6be19d 100755 --- a/src/cli/generate.ts +++ b/src/cli/generate.ts @@ -63,8 +63,8 @@ program } }, ts: { - optionalFields: opts.optionalFieldPattern as OptionalFieldPattern, - untyped: opts.untypedType as UntypedType + optionalFields: OptionalFieldPattern[opts.optionalFieldPattern as keyof typeof OptionalFieldPattern], + untyped: UntypedType[opts.untypedType as keyof typeof UntypedType] } }; await generateFiles(options);