question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unresolved variable error in reactive destructuring assignments

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
anstarovoytcommented, Nov 27, 2020

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

0reactions
NickAlvesXcommented, Feb 14, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Svelte: Unresolved variable false-negative for reactive ...
I'm using the svelte plugin to develop a svelte app. The following piece of code is valid and works on runtime but is...
Read more >
import props, destructuring assignment & unresolved variable ...
I'm a bit new at frontend, so I have a question about code practices with with props importing. I'm using next.js (which is...
Read more >
Reactivity Transform - Vue.js
Reactive variables can be accessed and re-assigned just like normal variables, but these operations are compiled into refs with .value .
Read more >
Example of Reactively Destructuring Variables in Svelte
The first problem here is that this is not reactive. When the post prop changed, the title , body , and description values...
Read more >
Changelog | Meteor API Docs
If there is an error on index creation Meteor will output a better message ... object destructuring now is as fast as the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found