Skip to content

Commit

Permalink
Merge pull request #1 from BobbieGoede/fix/vue-module-type-augmentation
Browse files Browse the repository at this point in the history
fix: only augment `vue`, not sub-packages
  • Loading branch information
s00d authored Aug 19, 2024
2 parents fce68f7 + ba2d170 commit 0d4746f
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/runtime/plugins/01.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,24 +254,6 @@ declare module 'nuxt/dist/app/nuxt' {
interface NuxtApp extends PluginsInjections {}
}

declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$getLocale: () => string
$getLocales: () => string[]
$t: <T extends Record<string, string | number | boolean>>(
key: string,
params?: T,
defaultValue?: string
) => string | number | boolean | Translations | PluralTranslations | unknown[] | unknown | null
$tc: (key: string, count: number, defaultValue?: string) => string
$has: (key: string) => boolean
$mergeTranslations: (newTranslations: Translations) => void
$switchLocale: (locale: string) => void
$localeRoute: (to: RouteLocationRaw, locale?: string) => RouteLocationRaw
$loadPageTranslations: (locale: string, routeName: string) => Promise<void>
}
}

declare module 'vue' {
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface ComponentCustomProperties extends PluginsInjections {}
Expand Down

0 comments on commit 0d4746f

Please sign in to comment.