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

return type of create cannot be named #83

Open
tamird opened this issue May 11, 2022 · 2 comments
Open

return type of create cannot be named #83

tamird opened this issue May 11, 2022 · 2 comments

Comments

@tamird
Copy link

tamird commented May 11, 2022

* @returns {redaxios}

redaxios is not defined anywhere, so it cannot be used downstream. That is, it is impossible to define a function that takes the return type of create as a parameter.

@tamird
Copy link
Author

tamird commented May 11, 2022

Ah, I misunderstood - the problem is also that create is not exported at all, so it is not possible to create multiple clients.

EDIT: it is exported as redaxios.create, but the type is still unnameable.

@tamird
Copy link
Author

tamird commented May 11, 2022

Ah, it's possible to work around this by writing {typeof redaxios.default} in the jsdoc comment.

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