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 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.Webstorm version: 2020.2.2
Svelte version: 3.24.1
Svelte plugin version: 0.13.0
I use Rollup