Skip to content

Commit ea4ea7e

Browse files
authoredAug 25, 2020
fix(types): extend Axios.AxiosRequestConfig with "progress" option (#408)
As documented in https://axios.nuxtjs.org/options.html#progress, Nuxt Axios supports passing "progress" boolean through request options.
1 parent 4942979 commit ea4ea7e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎types/index.d.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ interface AxiosOptions {
2929
browserBaseURL?: string,
3030
credentials?: boolean,
3131
debug?: boolean,
32-
host?: string,
32+
host?: string,
3333
prefix?: string,
3434
progress?: boolean,
3535
proxyHeaders?: boolean,
@@ -49,6 +49,12 @@ interface AxiosOptions {
4949
},
5050
}
5151

52+
declare module 'axios' {
53+
interface AxiosRequestConfig {
54+
progress?: boolean;
55+
}
56+
}
57+
5258
declare module '@nuxt/vue-app' {
5359
interface Context {
5460
$axios: NuxtAxiosInstance

0 commit comments

Comments
 (0)
Please sign in to comment.