You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
minikN
changed the title
Documenting destructured function argument with rest parameter
[Question] Documenting destructured function argument with rest parameter
Jan 11, 2024
Hello,
Is it possible to correctly document something like this using JSDoc?
I don't understand how to document the rest param
...props
correctly in this case:If I hover over
...props
, VSCode describes it asWhich is incorrect, if I do
Inside the function body,
a
,b
,c
andd
have red lines, with the errorProperty 'q' does not exist on type '{ props: any; }'.ts(2339)
I don't understand why the type of
...props
is{ props: any; }
. If I changeto
I get the error
A rest parameter must be last in a parameter list.ts(1014)
.I'd appreciate any help on this. Thanks
Environment
VSCode 1.85.1
TypeScript 5.3.3
JSDoc config:
The text was updated successfully, but these errors were encountered: