I have http.js configuring axios however when importing it it fails with
src/main.ts(16,19): error TS2769: No overload matches this call.
-- | --
Overload 1 of 2, '(plugin: Plugin<[axios: AxiosStatic]>, axios: AxiosStatic): App<Element>', gave the following error.
Argument of type 'AxiosInstance' is not assignable to parameter of type 'AxiosStatic'.
Type 'AxiosInstance' is missing the following properties from type 'AxiosStatic': create, Cancel, CancelToken, Axios, and 12 more.
Overload 2 of 2, '(plugin: Plugin<[axios: AxiosStatic]>, options: [axios: AxiosStatic]): App<Element>', gave the following error.
Argument of type 'AxiosInstance' is not assignable to parameter of type '[axios: AxiosStatic]'.
src/main.ts(16,19): error TS2769: No overload matches this call.
Overload 1 of 2, '(plugin: Plugin<[axios: AxiosStatic]>, axios: AxiosStatic): App<Element>', gave the following error.
Argument of type 'AxiosInstance' is not assignable to parameter of type 'AxiosStatic'.
Type 'AxiosInstance' is missing the following properties from type 'AxiosStatic': create, Cancel, CancelToken, Axios, and 12 more.
Overload 2 of 2, '(plugin: Plugin<[axios: AxiosStatic]>, options: [axios: AxiosStatic]): App<Element>', gave the following error.
Argument of type 'AxiosInstance' is not assignable to parameter of type '[axios: AxiosStatic]'.
ERROR: "type-check" exited with 2.
import './assets/main.css'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import http from './http'
import VueAxios from 'vue-axios'
const app = createApp(App)
app.use(createPinia())
app.use(router)
app.use(VueAxios, http)
app.mount('#app')
This works fine with javascript and only fails with TypeScript. I'm sure it's something simple to fix. I checked the tickets and saw there may be issues with types and such as there doesn't seem to be full TS support.
I have
http.js
configuring axios however when importing it it fails withhttp.js
main.js
This works fine with javascript and only fails with TypeScript. I'm sure it's something simple to fix. I checked the tickets and saw there may be issues with types and such as there doesn't seem to be full TS support.
Does anyone have a solution for this?