-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed as not planned
Closed as not planned
Copy link
Description
Describe the bug
sv migrate svelte-5
fails with an error like
Error while migrating Svelte code [InternalCompileError: Unexpected token `}`. Did you mean `}` or `{"}"}`?] {
when typescript code contains casting using angle-brackets. (<>)
Reproduction
in typescript code use angle-brackets casting:
const variable = <string>somevar;If you instead cast using the as keyword, it works as expected:
const variable = somevar as string;Logs
No response
System Info
sv 0.6.6
System:
OS: macOS 14.7.1
CPU: (14) arm64 Apple M3 Max
Memory: 104.59 MB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.9.0 - /usr/local/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.9.2 - /opt/homebrew/bin/npm
pnpm: 9.12.2 - ~/Library/pnpm/pnpm
Browsers:
Chrome: 131.0.6778.108
Edge: 131.0.2903.70
Safari: 18.1.1Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels