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

Typings are incorrect for default axios within context #322

Closed
moleCuleFFF opened this issue Jan 9, 2020 · 2 comments
Closed

Typings are incorrect for default axios within context #322

moleCuleFFF opened this issue Jan 9, 2020 · 2 comments

Comments

@moleCuleFFF
Copy link

Version

v5.9.0

Reproduction link

http://nofreakingway.com

Steps to reproduce

const cms: Plugin = (context, inject) => {
console.log((context.app.$axios as AxiosStatic).create());
};

$axios in this instance uses the interface NuxtAxiosInstance which does not include the create method.

What is expected ?

$axios should be an extended instance of AxiosStatic not AxiosInstance

What is actually happening?

$axios is an instance of AxiosInstance

This bug report is available on Nuxt community (#c317)
@pi0
Copy link
Member

pi0 commented Jan 11, 2020

Should be fixed with v5.9.3 .

@pi0 pi0 closed this as completed Jan 11, 2020
@davidlandais
Copy link

davidlandais commented Mar 13, 2020

@pi0 Still not fixed in current 5.9.5 release.
The "create" method is missing in your typings but it is documented

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

No branches or pull requests

3 participants