diff --git a/packages/nuxt/src/core/templates.ts b/packages/nuxt/src/core/templates.ts index 759d070562..8aef343fe9 100644 --- a/packages/nuxt/src/core/templates.ts +++ b/packages/nuxt/src/core/templates.ts @@ -151,10 +151,9 @@ import type { Plugin } from '#app' type Decorate> = { [K in keyof T as K extends string ? \`$\${K}\` : never]: T[K] } -type IsAny = 0 extends 1 & T ? true : false -type InjectionType = IsAny extends true ? unknown : A extends Plugin ? Decorate : unknown +type InjectionType = A extends {default: Plugin} ? Decorate : unknown -type NuxtAppInjections = \n ${tsImports.map(p => `InjectionType`).join(' &\n ')} +type NuxtAppInjections = \n ${tsImports.map(p => `InjectionType`).join(' &\n ')} declare module '#app' { interface NuxtApp extends NuxtAppInjections { }