Remove misplaced parameter description from RegExp#source JSDoc - #64352
Open
hikmetba-bit wants to merge 1 commit into
Open
hikmetba-bit wants to merge 1 commit into
hikmetba-bit wants to merge 1 commit into
Conversation
RegExpObject.source's JSDoc ended with "The regExp argument is a Regular expression object. It can be a variable name or a literal." That sentence describes a method parameter, but source is a read-only property that takes no argument; sibling properties (global, ignoreCase, multiline) end their comment right after "Read-only." Fixes microsoft#36299 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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 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.
tsc/internal/bundled/libs/lib.es5.d.ts'sRegExp.sourceJSDoc reads:The trailing sentence describes a method parameter named
regExp, butsourceis a read-only property that takes no argument — there's noregExpinvolved in reading it. The sibling properties right below it (global,ignoreCase,multiline) all end their comment immediately after "Read-only." with no such addendum, which is what this one should do too.Verified
src/no longer exists in this repo (the Go port undertsc/is now the sole implementation) and this bundled.d.tsfile is meant to be hand-edited directly — pertsc/internal/bundled/README.md, only the DOM/web-worker lib files are generated and off-limits to hand edits;lib.es5.d.tsisn't one of those.Two related typos reported in the same original issue (a pasted-in
String#replace/String#matchdoc, and a similarString#matchdoc inlib.es2015.symbol.wellknown.d.ts) have already been fixed since the issue was filed; this is the one remaining leftover.Fixes #36299
🤖 Generated with Claude Code