tomblachut / svelte-intellij

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

Reactive statements ($) in Webstorm #160

Closed owolfy closed 3 years ago

owolfy commented 3 years ago

I am following MDN's tutorial (https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Svelte_variables_props). I am the point where I need to write:

let newTodoId $: { if (totalTodos === 0) { newTodoId = 1; } else { newTodoId = Math.max(...todos.map(t => t.id)) + 1; } }

The bug is that Webstorm lables newTodoId as "Unresolved variable or type totalTodos" and marks it with red color. I am able to run the app, yet this issue remains even after re-launching Webstorm.

Same goes for any reactive statement in the HTML part. Eg;$: totalTodos = todos.length which is marked in red color.

I use Rollup

tomblachut commented 3 years ago

7 tracks missing support for that