NuxtN
Nuxt12mo ago
4 replies
Bobakanoosh

"export" PageMeta overrides from layer

I have an auth layer that has a middleware that checks routse for route.meta.permissions

I added that to a .d.ts file so I get full type safety:
declare module "#app" {
    interface PageMeta {
        permissions?: UserPermission[];
    }
}

// It is always important to ensure you import/export something when augmenting a type
export {};


But, the app i have extending this layer doesn't get that type safety. What can i do to fix that?
Was this page helpful?