NonNullable bloating the typings file
Closed this issue · 4 comments
kostia1st commented
Issue
I'm a gentledev I:
- fully read the README recently
- searched for existing issues
- checked I'm up to date with the latest version of the project
Expected behavior
There should not be any NonNullable<>
wrappers around types that do not include nullable possibilities to begin with.
NonNullable<number>
NonNullable<string>
NonNullable<{ key: NonNullable<'value'> }>
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.
nfroidure commented
@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 commented
@kostia1st I finally gave it a lil try, feel free to review: #34
kostia1st commented
That looks great!
nfroidure commented
Just published the v6 then.