-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
NonNullable bloating the typings file #33
Comments
@kostia1st feel free to create a PR, it should sit around there: https://github.com/nfroidure/schema2dts/blob/main/src/index.ts#L1062C44-L1062C57 |
nfroidure
added a commit
that referenced
this issue
May 30, 2024
Use `null` literal to compose types intersections instead of using `NonNullable` for not nullable fields. It should lead to a lighter type definition. BREAKING CHANGE: Not sure if it really breaks anything but won't hurt to create a major version just in case. fix #33
@kostia1st I finally gave it a lil try, feel free to review: #34 |
That looks great! |
Just published the v6 then. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue
I'm a gentledev I:
Expected behavior
There should not be any
NonNullable<>
wrappers around types that do not include nullable possibilities to begin with.do not make any practical sense, and just add up enormous amount of visual clutter in generated code, not to mention the bloated file size.
Actual behavior
Contrary of the above
Steps to reproduce the behavior
Generate typings against virtually any OpenAPI out there.
The text was updated successfully, but these errors were encountered: