-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: support non-literal types in template literal strings #1509
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the pull request.
This change seemed to affect how template literal strings worked in mapped types and broke another test. I changed it to check for |
Thank you! |
🚀 PR was released in |
When given a template literal type which contains a
number
type, for instance:The generator fails with
Unknown type "number"
.This PR solves this by simply returning a
StringType
when a template literal string contains anumber
type, which makes sense, because JSON Schema can't really represent these types easily. I feel like making a regex-converter for these types is a bit overkill.