Auto-Import icon indicating copy to clipboard operation
Auto-Import copied to clipboard

Destructuring breaks Auto-Import

Open nathanbabcock opened this issue 1 year ago • 1 comments

I often use exports like this:

export const [encoding, setEncoding] = createSignal(false)
export const [recording, setRecording] = createSignal(false)

It's a pretty common pattern in SolidJS.

Auto Import parses these exports incorrectly, showing them with a leading square bracket in the autocomplete suggestions:

vscode-auto-import-destructuring

nathanbabcock avatar Mar 26 '23 22:03 nathanbabcock

Also, the second element of the tuple (setXYZ) is never picked up either.

nathanbabcock avatar Mar 26 '23 22:03 nathanbabcock