Skip to content

Augment module types #575

Closed
Closed

Description

@chrisjansky

Describe the feature

Hi,

I am attempting to extend the templateParams property of ReactiveHead to get type safety in nuxt:

useHead({
  foo: true, // <--- Works fine (see below)
  templateParams: {
    foo: true, // <--- I want to get IDE type checking here
  },
})

With a lot of guesswork, I got so far:

declare module "@unhead/vue/types" {
  interface ReactiveHead {
    foo: boolean // <--- This works
    templateParams: {
      foo: never // <--- This doesn’t work
    }
  }
}

The strange thing is the root foo property is correctly typed, but I can’t change the templateParams prop at all. I tried different combinations but I wonder if it’s possible at all as it’s typed as internal ResolvableProperties type.

Thank you for any pointers!

Additional information

  • Would you be willing to help implement this feature?

Activity

  1. added
    enhancement
    on Aug 29, 2025
  2. added a commit that references this issue on Mar 10, 2026
    ef3df72
  3. added a commit that references this issue on Mar 10, 2026
    b062715
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions