nfroidure/schema2dts

NonNullable bloating the typings file

Closed this issue · 4 comments

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.

@kostia1st I finally gave it a lil try, feel free to review: #34

That looks great!

Just published the v6 then.