soates / Auto-Import

vscode extension that will automatically finds, parses and provides code actions for all available imports. Only currently works with files in your folder and TypeScript.
MIT License
165 stars 62 forks source link

Destructuring breaks Auto-Import #126

Open nathanbabcock opened 1 year ago

nathanbabcock commented 1 year ago

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 commented 1 year ago

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