Skip to content

Implement a @nonnull JSDoc tag - #57042

Closed
Daniel Rosenwasser (DanielRosenwasser) wants to merge 5 commits into
mainfrom
nonNullJSDoc
Closed

Implement a @nonnull JSDoc tag#57042
Daniel Rosenwasser (DanielRosenwasser) wants to merge 5 commits into
mainfrom
nonNullJSDoc

Conversation

@DanielRosenwasser

@DanielRosenwasserDaniel Rosenwasser (DanielRosenwasser) commented Jan 12, 2024

Copy link
Copy Markdown
Member

Fixes#23405.

@typescript-bot

Copy link
Copy Markdown
Contributor

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 Daniel Rosenwasser (@DanielRosenwasser) and Ryan Cavanaugh (@RyanCavanaugh) are aware of the changes, just as a heads up.

@NemoStein

Copy link
Copy Markdown

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?

@codenomnom

Copy link
Copy Markdown

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

@tats-u

Copy link
Copy Markdown

Nathan Shively-Sanders (@sandersn) You should leave a review to other members if you are too busy to review it.
About 1 year has been passed.

@aweebit

Copy link
Copy Markdown

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

@louwers

Copy link
Copy Markdown

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

@github-project-automationgithub-project-automationBot moved this from Waiting on reviewers to Done in PR BacklogMar 24, 2026
@typescript-bot

Copy link
Copy Markdown
Contributor

With 6.0 out as the final release vehicle for this codebase, we're closing all PRs that don't fit the merge criteria for post-6.0 patches. If you think this was a mistake and this PR fits the post-6.0 patch criteria, please post to the 6.0 iteration issue with details (specifically, which PR and which patch criteria it satisfies).

Next steps for PRs:

  • For crash bugfixes or language service improvements, PRs are currently accepted at the typescript-go repo
  • Changes to type system behavior should wait until after 7.0, at which point mainline TypeScript development will resume in this repository with the Go codebase
  • Library file updates (lib.d.ts etc) continue to live in this repo or the DOM Generator repo as appropriate

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: TeamFor Backlog BugPRs that fix a backlog bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Support a @nonnull/@nonnullable JSDoc assertion comment

9 participants

@DanielRosenwasser@typescript-bot@NemoStein@codenomnom@tats-u@aweebit@louwers@sandersn@RyanCavanaugh