Skip to content

Commit

Permalink
feat: provide Nuxt 2.9 types
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmarrec committed Aug 20, 2019
1 parent 06db3a1 commit 6b814bc
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions types/index.d.ts
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 6b814bc

Please sign in to comment.