lib: fix Atomics.waitAsync timeout parameter description - #63739
Open
Yogesh Kumar (yogesh968) wants to merge 1 commit into
Open
lib: fix Atomics.waitAsync timeout parameter description#63739Yogesh Kumar (yogesh968) wants to merge 1 commit into
Yogesh Kumar (yogesh968) wants to merge 1 commit into
Conversation
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.
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both
Atomics.waitAsyncoverloads document theirtimeoutparameter as:That description belongs to the parameter above it —
valueis documented with exactlythe same sentence, so this reads as a copy/paste that was never adjusted.
timeoutisnot 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
timeoutargument ofAtomics.waitAsyncdescribes 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
Int32ArrayandBigInt64Arrayoverloads.I also dropped the brackets from
@param [timeout]to plain@param timeout. These twolines 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?: numberin 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.