Skip to content

Commit

Permalink
fix(types): add type for Nuxt's context.app.i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl committed Sep 3, 2019
1 parent 6f6c235 commit d5afd8b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions types/vue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,12 @@ declare module "vue-i18n" {
setLocale: (locale: string) => Promise<undefined>
}
}

/**
* Extends types in Nuxt
*/
declare module '@nuxt/types/app' {
interface NuxtAppOptions extends NuxtVueI18n.Options.NuxtI18nInterface {
readonly i18n: VueI18n & IVueI18n
}
}

0 comments on commit d5afd8b

Please sign in to comment.