Skip to content

Commit

Permalink
Merge pull request #174 from hemedani/main
Browse files Browse the repository at this point in the history
add record recognization in type generation
  • Loading branch information
hemedani authored Aug 17, 2024
2 parents 29f4217 + 4983ea9 commit fc46fbe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/types/generateTypesFromStruct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,10 @@ export const generateTypesFromStruct = (
`${keyname}: boolean${postFix ? (postFix + ";") : ";"}\n`;
}

if (schemaStruct.type === "record") {
returnStr = returnStr +
`${keyname}: Record<string, any>;\n`;
}

return returnStr;
};

0 comments on commit fc46fbe

Please sign in to comment.