Typings are incorrect for default axios within context

moleCuleFFF
0
moleCuleFFF
commented 3 months ago

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

bug
0
pi0
37.3k
pi0
commented 3 months ago

Should be fixed with v5.9.3 .

0
Informations
Bug Report โ€ข Open
#c317 - Created 3 months ago