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

Expand typed rest parameters in call signatures #120

Open
KyleJune opened this issue Mar 13, 2022 · 2 comments
Open

Expand typed rest parameters in call signatures #120

KyleJune opened this issue Mar 13, 2022 · 2 comments

Comments

@KyleJune
Copy link

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters

I have multiple functions in the same file that share the same call signatures. I created an alias type for the call signatures to avoid repeating myself and reduce the odds of missing a place to update. In vscode, the hint for how to call the function shows all 13 call signatures for the function. I would expect the same behavior in the deno docs. Currently the deno docs just show the rest parameter not expanded.

image

https://doc.deno.land/https://deno.land/x/test_suite@0.13.0/mod.ts/~/it
image

Here is a link to the ItArgs<T> type.

@kitsonk
Copy link
Contributor

kitsonk commented Mar 13, 2022

Try exporting the ItArgs. It will allow the doc generator to link to it.

@KyleJune
Copy link
Author

I just tried that now. It still shows the same but links to the type for ItArgs. I originally didn't export it because I didn't want to add an export for a type that is only used internally. vs code is able to figure out what the call signatures are without exporting the ItArgs type.

https://doc.deno.land/https://raw.githubusercontent.com/udibo/test_suite/dev/mod.ts/~/it

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

2 participants