Open bennymi opened 6 months ago
simpler reproduction. Seems the cast is treated as JSX, wondering if there's an option in the Acorn TS plugin to not do that.
Either way, it's best to use as
type casts instead, i.e. do
$: {
anchorEls = Array.from(document.querySelectorAll('a')) as HTMLAnchorElement[];
}
instead
Describe the bug
Adding type casting inside a reactive block causes an error. This worked in Svelte 4.
Reproduction
Svelte 5 Repl
Logs
No response
System Info
Severity
annoyance