You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Reactive variables appear to be unassigned to the compiler, if you define them in a reactive block with curly braces, both in template and in script tag.
To Reproduce
<scriptlang="ts">exportletcheck: boolean;letderived: string;
$: {derived=check.toString();}// Variable 'derived' is used before being assigned.console.log(derived.toUpperCase())</script><!-- Variable 'derived' is used before being assigned. -->
{derived.toUpperCase()}
Expected behavior
Shouldn't report any errors here.
System (please complete the following information):
OS: Mac OS 10.15.3
IDE: VS Code
Plugin/Package: Svelte for VS Code (the new official one)
Additional context
Used to work a week ago. It works fine if you change the syntax to $: derived = ... without the brackets.
Also, svelte-check doesn't report any errors here.
The text was updated successfully, but these errors were encountered:
Describe the bug
Reactive variables appear to be unassigned to the compiler, if you define them in a reactive block with curly braces, both in template and in script tag.
To Reproduce
Expected behavior
Shouldn't report any errors here.
System (please complete the following information):
OS: Mac OS 10.15.3
IDE: VS Code
Plugin/Package: Svelte for VS Code (the new official one)
Additional context
Used to work a week ago. It works fine if you change the syntax to
$: derived = ...
without the brackets.Also,
svelte-check
doesn't report any errors here.The text was updated successfully, but these errors were encountered: