lib: fix two Reflect JSDoc defects - #63740
Open
Yogesh Kumar (yogesh968) wants to merge 1 commit into
Open
Conversation
Reflect.set documents target, propertyKey and receiver but skips value, the one parameter that says what is being assigned. Reflect.setPrototypeOf's summary reads "Sets the prototype of a specified object o to object proto or null", but this function's parameters are target and proto - there is no o. The wording appears to have been carried over from Object.setPrototypeOf(o, proto) in lib.es5.d.ts, which does have one.
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
1 similar comment
|
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.
Two small documentation defects in
lib.es2015.reflect.d.ts:Reflect.setdoes not documentvalue. The block documentstarget,propertyKeyand
receiver— everything except the value being assigned, which is skipped in themiddle of the list:
Reflect.setPrototypeOf's summary refers to parameters that do not exist. It reads"Sets the prototype of a specified object o to object proto or null", but the parameters
are named
targetandproto— there is noo. The wording looks inherited fromObject.setPrototypeOf(o, proto)inlib.es5.d.ts, which does have ano. Renamed thereference to
targetand put both parameter names in backticks so they read asidentifiers.
Documentation only; no signatures changed.
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.