-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
When trying to use type assertion with bind syntax, a syntax error causes a crash.
Reproduction
<svelte:options runes />
<script lang="ts">
let element = $state<HTMLDivElement>();
</script>
<div bind:this={element as HTMLElement}></div>The as HTMLElement part causes a syntax error.
Logs
No response
System Info
System:
OS: Windows 11 10.0.22621
CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-12650H
Memory: 5.61 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.133)
Internet Explorer: 11.0.22621.1
npmPackages:
svelte: ^5.0.0-next.34 => 5.0.0-next.34Severity
blocking an upgrade
Metadata
Metadata
Assignees
Labels
No labels