TypeScript
TypeScript copied to clipboard
Implement a `@nonnull` JSDoc tag
Fixes #23405.
Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.
Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up.
TS 5.5 beta is released, but this isn't merged yet... Are there any plans to ship this with 5.5 or will it be pushd forward?
Any news on this one? It's been a while...
@sandersn You should leave a review to other members if you are too busy to review it. About 1 year has been passed.
@nonnull is a pretty bad name for this, makes it feel like it's only about null, and not undefined.
@nonnullable is better as it corresponds to the NonNullable utility type's name.
@nonnullish with nullish as in the nullish coalescing operator meaning exactly that, the null and undefined values, is also a good alternative.
But my favorite option is actually /** @type {!} */.
I like nonnullable better, it is a bit more verbose, but JSDoc does not shy away from some verbosity.