Use maketypes library for json-to-ts and json-to-zod transformations. #402
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are limitations to the currenty json-to-zod and json-to-ts libraries in use. I raised one specific issue in #401, but others include using any over union types, using null where undefined is appropriate etc.
Personally I think the maketypes library is a better default option and should just replace the current options, but being able to toggle between underlyings is also a viable approach here, should we want to preserve legacy behavior.
Lastly because of the library chosen I had to disable the noUnusedParamaters check in tsconfig.json.