Skip to content

auth option of definePageMeta is not typed #397

@mlutsiuk

Description

@mlutsiuk

Environment

  • Operating System: Windows_NT
  • Node Version: v16.18.0
  • Nuxt Version: 3.4.2
  • Nitro Version: 2.3.2
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: modules, build, auth
  • Runtime Modules: ../src/module.ts
  • Build Modules: -

Reproduction

No response

Describe the bug

definePageMeta({ auth }) in not typed
image

There is some type declarations in src/runtime/middleware/auth.ts, but it has no impact

type MiddlewareMeta = boolean | {
  unauthenticatedOnly: true,
  navigateAuthenticatedTo?: string,
}

declare module '#app' {
  interface PageMeta {
    auth?: MiddlewareMeta
  }
}

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions