apollographql / apollographql/apollo-tooling
Generate undefined instead of null in typescript
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
- [x] feature
I think there has been an intense argument going around with `null` vs `undefined` in the JS community. But, in the typescript world, pretty much [microsoft](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines#null-and-undefined) has recommended to avoid `null` and use `undefined`.
Can we have an option argument to generate `undefined` instead of `null` in typescript? Coming from `swift` world, it will be pretty useful to just deal with `undefined` than adding `null` to the mix.
Any thoughts?
Contributor guide
Research direction
Start by locating the TypeScript generation entry point and how generation options are defined. Determine the scope of replacing generated null values with undefined, including how the option should affect output, then review the existing discussion before proposing a design and corresponding coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100