tomblachut / svelte-intellij

Svelte components in WebStorm and friends
MIT License
482 stars 38 forks source link

Unresolved variable error in reactive destructuring assignments #181

Closed broad-well closed 1 year ago

broad-well commented 3 years ago

To reproduce this issue, try the following:

<script>
  $: [a, b, c] = [1, 2, 3];
</script>

This is a valid segment that is semantically similar to let [a, b, c] = [1, 2, 3]. It compiles and behaves as expected, but the plugin claims that a, b, and c are unresolved variables or types.

tomblachut commented 3 years ago

I spent some time trying to fix this, but unfortunately it will require lots of engineering hours as far as I understand

anstarovoyt commented 3 years ago

@tomblachut I will take a look, maybe we need some magic knowledge there :)

he1d1 commented 2 years ago

Perhaps this is related to #249

tomblachut commented 2 years ago

@hiluw not really, destructuring is handled separately from basic variables

NickAlvesX commented 2 years ago

Same thing for $: ({ isPaused }: StoreData = $store);

tomblachut commented 1 year ago

Migrated to WEB-53209 Svelte: Unresolved variable false-negative for destructured reactive declaration references