Maybe reuse the $:{} here, tho that would probably be really confusing for svelte 4 developers lol
$:{ let name = 'world'; };
vs
let name = $state('world');
$: is valid javascript right? So that should also work in .js/.ts files I assume
$:{ let name = 'world'; };
vs
let name = $state('world');
$: is valid javascript right? So that should also work in .js/.ts files I assume
The $: label syntax is valid JavaScript, but allowing scoped variables to be accessible outside of scope is very invalid JavaScript.