-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Unexpected token" parse error #13179
Comments
<script lang="ts">
const foo = <bar>{ [baz]: qux };
</script>
This is presumably an acorn-typescript bug. |
Probably TyrealHu/acorn-typescript#58 |
Yeah probably - I think Acorn-Typescript doesn't parse type casts using |
Prior to Svelte 5 this worked...
Now it has to be...
TSX does not permit the first type of casting (but I'm using regular TypeScript). Is it possible Acorn-TypeScript is treating TypeScript as TSX? |
Yes, that is what is described in the linked issue above: TyrealHu/acorn-typescript#58 |
Describe the bug
Svelte 5 fails to parse code that Svelte 4 handled:
Reproduction
https://github.com/immich-app/immich/blob/8cf33690b8ddd8e36bdf5d968c3d5700bfcc2949/web/src/lib/components/admin-page/jobs/jobs-panel.svelte#L60
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: