Skip to content

lib: fix Atomics.waitAsync timeout parameter description - #63739

Open
Yogesh Kumar (yogesh968) wants to merge 1 commit into
microsoft:mainfrom
yogesh968:lib-atomics-waitasync-timeout-doc
Open

lib: fix Atomics.waitAsync timeout parameter description#63739
Yogesh Kumar (yogesh968) wants to merge 1 commit into
microsoft:mainfrom
yogesh968:lib-atomics-waitasync-timeout-doc

Conversation

@yogesh968

Copy link
Copy Markdown

Both Atomics.waitAsync overloads document their timeout parameter as:

@param [timeout] The expected value to test.

That description belongs to the parameter above it — value is documented with exactly
the same sentence, so this reads as a copy/paste that was never adjusted. timeout is
not a value to test against; it is how long to wait before the operation gives up and
settles with "timed-out".

The effect is visible in the editor: hovering the timeout argument of Atomics.waitAsync
describes it as the expected value to test, which is actively misleading rather than
merely missing.

Replaced with a description of what the parameter actually does, including the default,
in both the Int32Array and BigInt64Array overloads.

I also dropped the brackets from @param [timeout] to plain @param timeout. These two
lines are the only use of the optional-parameter bracket form in the whole of src/lib
(every other optional parameter is documented with a bare name), and the optionality is
already carried by timeout?: number in the signature.

Testing

npx hereby runtests-parallel — 106,369 passing, no baseline changes from this PR.
(The full run was done with this change alongside three other lib JSDoc fixes I am
sending separately; the only baselines it moved belong to the [Symbol.matchAll]
parameter rename in that other PR, not to this one.)

Disclosure

This patch was authored with AI assistance (Claude Code). I chose the change, reviewed the
diff, ran the tests locally, and will be the one responding to review feedback.

Both waitAsync overloads document their timeout parameter as "The expected value
to test", which is the description of the value parameter directly above it. The
parameter is not a value to test against; it is how long to wait before the
operation settles with "timed-out".

Also drop the brackets from `@param [timeout]`. These two lines were the only use
of the optional-parameter bracket form under src/lib, and the optionality is
already expressed by `timeout?: number` in the signature.
Copilot AI lite review requested due to automatic review settings August 10, 2026 07:30
@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Aug 10, 2026
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Aug 10, 2026
@typescript-automation

Copy link
Copy Markdown

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

3 participants