-
Notifications
You must be signed in to change notification settings - Fork 174
Closed
Description
When using the nuxt-auth-utils module and starting Nuxt, two imports are generated in the .nuxt/types/plugins.d.ts file:
/* ... */
InjectionType<typeof import("../../node_modules/.pnpm/nuxt-auth-utils@0.3.5_magicast@0.3.5_rollup@4.21.2/node_modules/nuxt-auth-utils/dist/runtime/app/plugins/session.client.js").default> &
InjectionType<typeof import("../../node_modules/.pnpm/nuxt-auth-utils@0.3.5_magicast@0.3.5_rollup@4.21.2/node_modules/nuxt-auth-utils/dist/runtime/app/plugins/session.server.js").default> &
/* ... */These two imports don't resolve because the files dist/runtime/app/plugins/session.client.d.ts and dist/runtime/app/plugins/session.server.d.ts are empty. This breaks the typing of other plugins that provide a helper on the NuxtApp instance, such as trpc-nuxt:
const { $trpc } = useNuxtApp() // '$trpc' is of type 'unknown'Using export default {} in the session.client.d.ts and session.server.d.ts files solves the issue.
Metadata
Metadata
Assignees
Labels
No labels