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
Hi! I've had the same issue, it seems if props are not assigned to a variable, withDefaults doesn't work. The workaround is to assign it. This should work:
In Dev mode it works, but I have a problem with Typesscript. In the package the types for defineProps and withDefaults are not present. This will show up in the final build.
📚 What are you trying to do? Please describe.
Want to declare defaults to my component props in Typescript with the script setup as indicated here
🔍 What have you tried?
says
withDefaults is not defined
ℹ️ Additional context
I am running a nuxt 2 project with:
Anyone know how to do this ?
The text was updated successfully, but these errors were encountered: