Describe the bug
As of version 44 the bug has been fixed and trying to use type assertion on HTML elements and components no longer causes a crash but when bind:this is used a ; exptected error is shown which is annoying. note that this is only shown for bind:this and if for example bind:something where something is a prop is used then no error is shown. Just thought I should point it out in case anyone missed it.
Reproduction
<svelte:options runes />
<script lang="ts">
import Component from "$components/Component/Component.svelte";
let div = $state<HTMLDivElement>();
let object = $state<unkown>();
</script>
<div bind:this={div as any}></div>
<Component bind:this={object as any}></Component>
Logs
No response
System Info
System:
OS: Windows 11 10.0.22621
CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-12650H
Memory: 6.00 GB / 15.63 GB
Binaries:
Node: 18.14.2 - C:\Program Files\nodejs\node.EXE
npm: 9.7.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (120.0.2210.144)
Internet Explorer: 11.0.22621.1
npmPackages:
svelte: ^5.0.0-next.44 => 5.0.0-next.44
Severity
annoyance
Describe the bug
As of version 44 the bug has been fixed and trying to use type assertion on HTML elements and components no longer causes a crash but when
bind:thisis used a; exptectederror is shown which is annoying. note that this is only shown forbind:thisand if for examplebind:somethingwhere something is a prop is used then no error is shown. Just thought I should point it out in case anyone missed it.Reproduction
Logs
No response
System Info
System: OS: Windows 11 10.0.22621 CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-12650H Memory: 6.00 GB / 15.63 GB Binaries: Node: 18.14.2 - C:\Program Files\nodejs\node.EXE npm: 9.7.1 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Chromium (120.0.2210.144) Internet Explorer: 11.0.22621.1 npmPackages: svelte: ^5.0.0-next.44 => 5.0.0-next.44Severity
annoyance