NuxtN
Nuxtβ€’2y ago
Orbis

TS: Custom typed PageMeta not working

i am facing
layouts/default.vue:9:69 - error TS18046: '__VLS_ctx.route.meta.backTo' is of type 'unknown'.


this is my index.d.ts
declare module '#app' {
  interface PageMeta {
    backTo?: {
      to: string
      text: string
    }
  }
}

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

i think at one moment it worked and then it didnt πŸ˜…
any ideas?
Was this page helpful?