docs: remove stale parentType param from validateChildKeys JSDoc#36928
Conversation
PR react#34174 removed the second argument from validateChildKeys, changing the signature from validateChildKeys(node, parentType) to validateChildKeys(node), but left the @param {*} parentType line in the function's JSDoc. Drop that stale line so the doc matches the single remaining parameter.
|
Hi @anxkhn! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
daltino
left a comment
There was a problem hiding this comment.
This PR removes a stale parentType parameter from the JSDoc for validateChildKeys, aligning the documentation with the current function signature. The change is simple and improves clarity, with no functional impact.
|
Comparing: e71a639...719157b Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
validateChildKeysinpackages/react/src/jsx/ReactJSXElement.jshad a signatureof
validateChildKeys(node, parentType), but #34174 ("Remove unused arguments fromReactElement") dropped the second argument, changing the signature to
validateChildKeys(node)and updating every call site to pass a single argument.That change removed several now-unused
@paramlines from the same file, but leftone behind on
validateChildKeys:parentTypeno longer appears anywhere in the function signature or body, so this@paramline is stale and misleading to anyone reading the doc comment. This PRdeletes that single line. The remaining
@param {ReactNode} nodealready fully andcorrectly documents the sole parameter. No code or behavior change.
How did you test this change?
This is a documentation-only change (a JSDoc comment on an
@internalhelper), sothere is no runtime behavior to test. I verified it as follows:
parentTypeno longer appears anywhere inpackages/react/src/jsx/ReactJSXElement.js(grep -n parentTypereturns nomatches after the change).
function validateChildKeys(node)and all call sites areunchanged by this diff.
yarn prettier(viascripts/prettier/index.js check-changed) - clean.yarn linc(ESLint on changed files) - passed.yarn flow dom-node- No errors.Diff (for reference)