-
Notifications
You must be signed in to change notification settings - Fork 244
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
fix(types): extend from AxiosStatic
#319
Conversation
The error is: TS2339: Property 'CancelToken' does not exist on type 'NuxtAxiosInstance'.
Codecov Report
@@ Coverage Diff @@
## dev #319 +/- ##
===================================
Coverage 100% 100%
===================================
Files 1 1
Lines 30 30
Branches 13 13
===================================
Hits 30 30 Continue to review full report at Codecov.
|
Resolve #322 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import needs to be changed
I don't understand, Why the import need be changed? |
@MrJmpl3 First line of the file, |
types/index.d.ts
Outdated
@@ -1,8 +1,8 @@ | |||
import { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios' | |||
import { AxiosError, AxiosStatic, AxiosRequestConfig, AxiosResponse } from 'axios' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { AxiosError, AxiosStatic, AxiosRequestConfig, AxiosResponse } from 'axios' | |
import { AxiosError, AxiosRequestConfig, AxiosResponse, AxiosStatic } from 'axios' |
The error is: TS2339: Property 'CancelToken' does not exist on type 'NuxtAxiosInstance'.
https://axios.nuxtjs.org/usage#cancel-token
const { CancelToken } = this.$axios