docs(util): improve JSDoc for parseSelector, reflow and getNextActiveElement#42479
Open
fauzan171 wants to merge 1 commit into
Open
docs(util): improve JSDoc for parseSelector, reflow and getNextActiveElement#42479fauzan171 wants to merge 1 commit into
fauzan171 wants to merge 1 commit into
Conversation
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.
Description
This PR improves the JSDoc blocks for three public utility helpers exported from
js/src/util/index.js. No runtime behaviour is changed — only comments.parseSelector/and.in IDs breakdocument.querySelector).@paramand@returns.reflow@paramand added@returns {void}.@return voidwith the canonical@returns {void}for consistency with the rest of the file (e.g.parseSelector).getNextActiveElementactiveElement,shouldGetNextandisCycleAllowed(previously onlylisthad a type).isCycleAllowed, which previously had none.{Element|elem}was incorrect (elemis not a type). It is now{Element}.@returnto@returnsto match the rest of the file.Type of changes
Checklist
Why
These three helpers are the only ones in
util/index.jsthat carry JSDoc blocks, but the blocks were inconsistent (mixed@return/@returns, missing types, missing descriptions, an invalid return type). Cleaning them up improves IDE hover hints, TypeDoc/VSCode IntelliSense and makes the intent of the helpers easier to grok at a glance.