Button
: Add route types to to
prop (RouteLocation | RouteLocationRaw
)
#578
Labels
enhancement
New feature or request
Is your feature request related to a problem? Please describe.
I am using Nuxt with the
experimental.typedRoutes
feature. When I use the button for creating a link, like thisThe
to
prop is not defined as a prop in the types of the library (in theButton.vue.d.ts
inside thenode_modules
folder).So I don't get type checks and also no errors if I add a wrong route in there.
Describe the solution you'd like
Ideally, these two types (
RouteLocation | RouteLocationRaw
) would be added to theto
prop by nuxthq/ui, so that the prop is typed.Describe alternatives you've considered
What I can do is something like this:
Now the route object is typechecked and I can add it to the
to
field. Works, but not ideal.The text was updated successfully, but these errors were encountered: