Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScript
Milestone
Description
TypeScript Version: 3.0.0-dev.201xxxxx
Search Terms:
typos, string, lib, es2015.symbol.wellknown
I've wiped the majority of the template since this is a typo report.
I was originally going to just make a PR but the template had:
- There is an associated issue in the
Backlogmilestone (required)
The typo itself is that String#match in lib.es2015.symbol.wellknown has it's param description pasted in the middle of it's method description:
TypeScript/src/lib/es2015.symbol.wellknown.d.ts
Lines 209 to 212 in d2c5d54
| /** | |
| * Matches a string an object that supports being matched against, and returns an array containing the results of that search. | |
| * @param matcher An object that supports being matched against. | |
| */ |
My PR replaced it with "with a regular expression" - Let me know what the correct way to proceed with this is 🙂
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScript
Activity
G-Rath commentedon Feb 18, 2020
I've just found a similar typo in the
RegExpinterface ines5.lib:TypeScript/src/lib/es5.d.ts
Lines 912 to 913 in d2c5d54
The last part of the comment of the comment doesn't seem relevant:
My guess is that is the description for the
regexpparam taken by#match, which reads very similar:TypeScript/src/lib/es5.d.ts
Lines 416 to 420 in d2c5d54
sebmjoll commentedon Mar 6, 2020
I have found another comment issue in replace():
This comment is misleading because this function replaces all occurrences when the pattern is a regular expression but only the first occurrence when it is a literal as explained in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace :
which is confirmed by running the following code:
Remove misplaced parameter description from RegExp#source JSDoc