-
-
Notifications
You must be signed in to change notification settings - Fork 416
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<script setup>
variables declared with destructure
#24
Comments
Thanks for the report! Fixed in 0.15.10. And also fix the array binding case: <script setup>
const [item1, item2] = useArr()
</script>
<template>{{ item1 }} {{ item2 }}</template> |
That was fast! However, looking at the commit, not sure if the commit handles more complex destructure patterns: const { url, text = 1, foo: [bar, ...baz], ...qux } = useEditLink() Some relevant test cases in |
I completely forgot about this...Thank you for the use case, very useful! I will fix it tomorrow. |
fixed in 0.15.11, and now has been support type-only declarations for |
It seems
<script setup>
binding analysis is not accounting destructure patterns. This works:This doesn't:
The text was updated successfully, but these errors were encountered: