Skip to content

Commit

Permalink
feat(types): provide nuxt 2.9 compatible types (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmarrec authored and pi0 committed Aug 20, 2019
1 parent 11cf821 commit 7aee77b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,16 @@ declare module '@nuxt/vue-app' {
interface Context {
$axios: NuxtAxiosInstance
}
interface NuxtAppOptions {
$axios: NuxtAxiosInstance
}
}

// since nuxt 2.7.1 there is "NuxtAppOptions" for app context - see https://github.com/nuxt/nuxt.js/pull/5701
declare module '@nuxt/vue-app' {

// Nuxt 2.9+
declare module '@nuxt/types' {
interface Context {
$axios: NuxtAxiosInstance
}
interface NuxtAppOptions {
$axios: NuxtAxiosInstance
}
Expand Down

0 comments on commit 7aee77b

Please sign in to comment.