-
-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request