-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
help: withDefaults() Typescript script setup #568
Comments
Hi! I've had the same issue, it seems if props are not assigned to a variable, const _props = withDefaults(defineProps<{ prop: string }>(), { prop: 'my default' }) |
It doesn't help. |
I followed the example https://v3.vuejs.org/api/sfc-script-setup.html#typescript-only-features. In Dev mode it works, but I have a problem with Typesscript. In the package the types for |
馃摎 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: