From c268c6b51d5af040a1d7c789c9cd69d67ec7df61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ch=C5=82odnicki?= Date: Tue, 25 Aug 2020 14:37:45 +0200 Subject: [PATCH] fix(types): extend Axios.AxiosRequestConfig with "progress" option As documented in https://axios.nuxtjs.org/options.html#progress, Nuxt Axios supports passing "progress" boolean through request options. --- types/index.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/types/index.d.ts b/types/index.d.ts index cf3bdef..615eddc 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -29,7 +29,7 @@ interface AxiosOptions { browserBaseURL?: string, credentials?: boolean, debug?: boolean, - host?: string, + host?: string, prefix?: string, progress?: boolean, proxyHeaders?: boolean, @@ -49,6 +49,12 @@ interface AxiosOptions { }, } +declare module 'axios' { + interface AxiosRequestConfig { + progress?: boolean; + } +} + declare module '@nuxt/vue-app' { interface Context { $axios: NuxtAxiosInstance