google / google/closure-compiler
Non-Nullable by default flag
Open
enhancement
internal-issue-created
triage-done
Types
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
Closure compiler should have a flag to enable non-nullable by default. Switching to non-nullable as a compiler default would break a ton of backwards compatibility, but the existing semantics are screwy and a flag would allow a correction.
As it stands these two statements are equivalent:
```
/** @type {function(number)} */
/** @type {function(?number)} */
```
The current system requires a ridiculous amount of `!` symbols to counteract this.
Contributor guide
Assessment
This issue has not been assessed yet.