Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for rest-parameter tuple types #149

Open
thw0rted opened this issue Jul 6, 2022 · 1 comment
Open

Add support for rest-parameter tuple types #149

thw0rted opened this issue Jul 6, 2022 · 1 comment

Comments

@thw0rted
Copy link

thw0rted commented Jul 6, 2022

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
Copy link
Author

thw0rted commented Jul 6, 2022

Created microsoft/TypeScript#49801 , in case you want to track.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant