fix(nuxt): augment @vue/runtime-core and @vue/runtime-dom (#28446)

This commit is contained in:
Daniel Roe 2024-08-08 09:49:11 +01:00
parent 219653e2c6
commit 5132ef8c81
No known key found for this signature in database
GPG Key ID: CBC814C393D93268
2 changed files with 28 additions and 0 deletions

View File

@ -51,3 +51,23 @@ declare module 'vue' {
head?(nuxtApp: NuxtApp): UseHeadInput
}
}
declare module '@vue/runtime-core' {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface App<HostElement> {
$nuxt: NuxtApp
}
interface ComponentCustomProperties {
$nuxt: NuxtApp
}
}
declare module '@vue/runtime-dom' {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface App<HostElement> {
$nuxt: NuxtApp
}
interface ComponentCustomProperties {
$nuxt: NuxtApp
}
}

View File

@ -144,6 +144,14 @@ declare module '#app' {
}
}
declare module '@vue/runtime-core' {
interface ComponentCustomProperties extends NuxtAppInjections { }
}
declare module '@vue/runtime-dom' {
interface ComponentCustomProperties extends NuxtAppInjections { }
}
declare module 'vue' {
interface ComponentCustomProperties extends NuxtAppInjections { }
}