Skip to content

Commit

Permalink
fix(types): move getLocaleCookie/setLocaleCookie/SetLocale to proper …
Browse files Browse the repository at this point in the history
…interface
  • Loading branch information
rchl committed Sep 3, 2019
1 parent 3a4ada6 commit 7d3eceb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions types/vue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ declare namespace NuxtVueI18n {
routesNameSeparator: string
beforeLanguageSwitch: () => any
onLanguageSwitched: () => any
getLocaleCookie: () => string | undefined
setLocaleCookie: (locale: string) => undefined
setLocale: (locale: string) => Promise<undefined>
}

// see options reference: https://github.com/nuxt-community/nuxt-i18n/blob/master/docs/options-reference.md
Expand Down Expand Up @@ -106,6 +103,8 @@ declare module "vue-i18n" {
// the VueI18n class expands here: https://goo.gl/Xtp9EG
// it is necessary for the $i18n property in Vue interface: "readonly $i18n: VueI18n & IVueI18n"
interface IVueI18n extends NuxtVueI18n.Options.VueI18nInterface {

getLocaleCookie: () => string | undefined
setLocaleCookie: (locale: string) => undefined
setLocale: (locale: string) => Promise<undefined>
}
}

0 comments on commit 7d3eceb

Please sign in to comment.