From 8d950f3daeace564bd859f17cb731654ad25c835 Mon Sep 17 00:00:00 2001 From: Syd Amir Date: Sat, 17 Aug 2024 10:51:38 +0330 Subject: [PATCH] add record recognization in type generation --- src/types/generateTypesFromStruct.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/types/generateTypesFromStruct.ts b/src/types/generateTypesFromStruct.ts index e9020a2..4804aa8 100644 --- a/src/types/generateTypesFromStruct.ts +++ b/src/types/generateTypesFromStruct.ts @@ -76,5 +76,10 @@ export const generateTypesFromStruct = ( `${keyname}: boolean${postFix ? (postFix + ";") : ";"}\n`; } + if (schemaStruct.type === "record") { + returnStr = returnStr + + `${keyname}: Record;\n`; + } + return returnStr; };