From d1f8b20db3f8d42c3452eac52a0c952cd46cce53 Mon Sep 17 00:00:00 2001 From: Yogesh Kumar Date: Mon, 10 Aug 2026 12:58:09 +0530 Subject: [PATCH] lib: fix JSDoc @param tags that document nothing Three @param tags under src/lib name a parameter that does not exist, or name one without saying anything about it, so the tag contributes nothing to hover or signature help. RegExp[Symbol.matchAll] documents `@param string` while the parameter is `str`. Here the parameter is the outlier rather than the tag: [Symbol.match], [Symbol.replace], [Symbol.search] and [Symbol.split] all name this parameter `string`, so rename `str` to match its own JSDoc and its four siblings. WScript.CreateObject documents `@param strProgiID` - a typo for the actual parameter `strProgID` - and supplies no description. WScript.GetObject names `strProgID` correctly but leaves it equally undescribed. Fill both in. --- src/lib/es2020.symbol.wellknown.d.ts | 2 +- src/lib/scripthost.d.ts | 4 ++-- tests/baselines/reference/regexMatchAll-esnext.types | 4 ++-- tests/baselines/reference/regexMatchAll.types | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/es2020.symbol.wellknown.d.ts b/src/lib/es2020.symbol.wellknown.d.ts index 0f268da0a10f3..01f00da71b856 100644 --- a/src/lib/es2020.symbol.wellknown.d.ts +++ b/src/lib/es2020.symbol.wellknown.d.ts @@ -19,5 +19,5 @@ interface RegExp { * containing the results of that search. * @param string A string to search within. */ - [Symbol.matchAll](str: string): RegExpStringIterator; + [Symbol.matchAll](string: string): RegExpStringIterator; } diff --git a/src/lib/scripthost.d.ts b/src/lib/scripthost.d.ts index 704399103b3b5..13ad191ac1755 100644 --- a/src/lib/scripthost.d.ts +++ b/src/lib/scripthost.d.ts @@ -172,7 +172,7 @@ declare var WScript: { /** * Creates a COM object. - * @param strProgiID + * @param strProgID The programmatic identifier (ProgID) of the COM object to create. * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events. */ CreateObject(strProgID: string, strPrefix?: string): any; @@ -186,7 +186,7 @@ declare var WScript: { * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file. * @param strPathname Fully qualified path to the file containing the object persisted to disk. * For objects in memory, pass a zero-length string. - * @param strProgID + * @param strProgID The programmatic identifier (ProgID) of the object to retrieve or create. * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events. */ GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any; diff --git a/tests/baselines/reference/regexMatchAll-esnext.types b/tests/baselines/reference/regexMatchAll-esnext.types index f88e53e63be17..ea91e5e05d325 100644 --- a/tests/baselines/reference/regexMatchAll-esnext.types +++ b/tests/baselines/reference/regexMatchAll-esnext.types @@ -6,8 +6,8 @@ const matches = /\w/g[Symbol.matchAll]("matchAll"); > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >/\w/g[Symbol.matchAll]("matchAll") : RegExpStringIterator > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->/\w/g[Symbol.matchAll] : (str: string) => RegExpStringIterator -> : ^ ^^ ^^^^^ +>/\w/g[Symbol.matchAll] : (string: string) => RegExpStringIterator +> : ^ ^^ ^^^^^ >/\w/g : RegExp > : ^^^^^^ >Symbol.matchAll : unique symbol diff --git a/tests/baselines/reference/regexMatchAll.types b/tests/baselines/reference/regexMatchAll.types index 3ed3a037576f9..1ac47df339bf4 100644 --- a/tests/baselines/reference/regexMatchAll.types +++ b/tests/baselines/reference/regexMatchAll.types @@ -6,8 +6,8 @@ const matches = /\w/g[Symbol.matchAll]("matchAll"); > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >/\w/g[Symbol.matchAll]("matchAll") : RegExpStringIterator > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->/\w/g[Symbol.matchAll] : (str: string) => RegExpStringIterator -> : ^ ^^ ^^^^^ +>/\w/g[Symbol.matchAll] : (string: string) => RegExpStringIterator +> : ^ ^^ ^^^^^ >/\w/g : RegExp > : ^^^^^^ >Symbol.matchAll : unique symbol