Skip to content

Commit 7aee77b

Browse files
kevinmarrecpi0
authored andcommitted
feat(types): provide nuxt 2.9 compatible types (#277)
1 parent 11cf821 commit 7aee77b

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

types/index.d.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,16 @@ declare module '@nuxt/vue-app' {
2626
interface Context {
2727
$axios: NuxtAxiosInstance
2828
}
29+
interface NuxtAppOptions {
30+
$axios: NuxtAxiosInstance
31+
}
2932
}
30-
31-
// since nuxt 2.7.1 there is "NuxtAppOptions" for app context - see https://github.com/nuxt/nuxt.js/pull/5701
32-
declare module '@nuxt/vue-app' {
33+
34+
// Nuxt 2.9+
35+
declare module '@nuxt/types' {
36+
interface Context {
37+
$axios: NuxtAxiosInstance
38+
}
3339
interface NuxtAppOptions {
3440
$axios: NuxtAxiosInstance
3541
}

0 commit comments

Comments
 (0)