tsd-jsdoc icon indicating copy to clipboard operation
tsd-jsdoc copied to clipboard

Add support for rest-parameter tuple types

Open thw0rted opened this issue 1 year ago • 1 comments

I've run into an incompatibility between JSDoc and Typescript, and I'm really not sure how to fix it.

The short version is, I need to create the type function foo(...args: [A, B]) -- or, more specifically, function foo(...args: Parameters<OtherFunc>) -- but the JSDoc format for rest-parameters automatically turns @parameter {...X} into an array of X, as you already discovered.

As you're probably aware, JSDoc hasn't added any new features for over 5 years now, so I'm not counting on them to fix this. I actually think even if you switched to the TS compiler, there might not be a syntax to support this. I'm going to post an issue over there, and mention this one in hopes that somebody has an idea of how to move forward.

thw0rted avatar Jul 06 '22 09:07 thw0rted