Skip to content
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

fix(reactivity-transform): correct semicolon insertion with more complex destructuring #7464

Closed

Conversation

taye
Copy link

@taye taye commented Jan 4, 2023

input:

let [a, { b }] = $(useBar())

output:

before

import { toRef as _toRef } from 'vue'
let __$temp_1 = (useBar()),
a = _toRef(__$temp_1, 0),
b = _toRef(__$temp_1[1], 'b');,
a = _toRef(__$temp_1, 1);

after:

import { toRef as _toRef } from 'vue'
let __$temp_1 = (useBar()),
a = _toRef(__$temp_1, 0),
b = _toRef(__$temp_1[1], 'b');

❤️

@sxzz
Copy link
Member

sxzz commented Jan 4, 2023

relate issue #6312
relate PR #6303 #7279 #6944

my relate comment #7279 (comment)

@taye taye closed this Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants