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.
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.