developit/redaxios

return type of `create` cannot be named

tamird opened this issue · 2 comments

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

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.

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