JSDoc rest arguments can no longer be extracted with Parameters<T> #43072
Labels
Fix Available
A PR has been opened for this issue
Needs Investigation
This issue needs a team member to investigate its status.
Milestone
Bug Report
According to the docs,
{...string}
can be used to define a rest parameter having typestring[]
. This works for the implementation, but does not construct a type that can be extracted using standard utility types.🔎 Search Terms
JSDoc variadic arguments, var args, rest arguments
🕗 Version & Regression Information
This was discovered while upgrading TypeScript from 4.1.5 to 4.2.2 in TypeDoc. There is a test case for variadic parameters which changed in an unexpected way.
Please keep and fill in the line that best applies:
⏯ Playground Link
Bug Workbench links:
💻 Code
🙁 Actual behavior
TS 4.2 resolves
Params = never
🙂 Expected behavior
TS 4.1 resolves
Params = string[]
The text was updated successfully, but these errors were encountered: