TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Implement a `@nonnull` JSDoc tag

Open DanielRosenwasser opened this issue 1 year ago • 5 comments

Fixes #23405.

DanielRosenwasser avatar Jan 12 '24 21:01 DanielRosenwasser

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.

typescript-bot avatar Jan 12 '24 21:01 typescript-bot

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?

NemoStein avatar Apr 26 '24 13:04 NemoStein

Any news on this one? It's been a while...

codenomnom avatar Oct 01 '24 17:10 codenomnom

@sandersn You should leave a review to other members if you are too busy to review it. About 1 year has been passed.

tats-u avatar Jan 22 '25 12:01 tats-u

@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 {!} */.

aweebit avatar Jun 12 '25 08:06 aweebit

I like nonnullable better, it is a bit more verbose, but JSDoc does not shy away from some verbosity.

louwers avatar Sep 03 '25 21:09 louwers