You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"{interfaceReactiveHead{foo: boolean// <--- This workstemplateParams: {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
fix(types): make templateParams extensible via module augmentation
fix(types): make templateParams extensible via module augmentation (#679