Skip to content

Commit

Permalink
fix(types): update module augmentation
Browse files Browse the repository at this point in the history
Since nuxt/nuxt#26541 multiple modules need to be augmented for type checking to continue working as expected.
  • Loading branch information
dargmuesli authored and victorgarciaesgi committed Apr 17, 2024
1 parent 4b97976 commit 64c71e9
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/core/output/generators/files/__typed-router.d.file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,21 @@ export function createTypedRouterDefinitionFile(): string {
> & {
$props: TypedNuxtLinkProps<T, P, E>;
};
declare module '@vue/runtime-core' {
interface GlobalComponents {
NuxtLink: TypedNuxtLink;
${returnIfTrue(i18n, ` NuxtLinkLocale: TypedNuxtLinkLocale;`)}
}
}
declare module '@vue/runtime-dom' {
interface GlobalComponents {
NuxtLink: TypedNuxtLink;
${returnIfTrue(i18n, ` NuxtLinkLocale: TypedNuxtLinkLocale;`)}
}
}
declare module 'vue' {
interface GlobalComponents {
NuxtLink: TypedNuxtLink;
Expand Down

0 comments on commit 64c71e9

Please sign in to comment.