-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Svelte 5: Cannot specify this
' type in TypeScript
#11731
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
Labels
Comments
related to #11502, though I wonder if we should treat this instance specifically |
Well this is more of a typing issue rather than a runtime one right? I would say if we can we should try to make this work. |
yeah, we should definitely fix this |
dummdidumm
added a commit
that referenced
this issue
May 27, 2024
5 tasks
Rich-Harris
pushed a commit
that referenced
this issue
May 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When using TypeScript the syntax for specifying the type of
this
is no longer supported. Builds throw a syntax error. Dev server removes the type, but keeps thethis
parameter, leading to syntax errors at runtime.Reproduction
REPL
Logs
vite build: ✓ 204 modules transformed. x Build failed in 3.56s error during build: RollupError: Expected ident at getRollupError (file://.../node_modules/rollup/dist/es/shared/parseAst.js:396:41) at ParseError.initialise (file://.../node_modules/rollup/dist/es/shared/node-entry.js:11332:28) at convertNode (file://.../node_modules/rollup/dist/es/shared/node-entry.js:13082:10) at convertProgram (file://.../node_modules/rollup/dist/es/shared/node-entry.js:12399:12) at Module.setSource (file://.../node_modules/rollup/dist/es/shared/node-entry.js:14246:24) at async ModuleLoader.addModuleSource (file://.../node_modules/rollup/dist/es/shared/node-entry.js:18892:13) Browser via vite: Uncaught SyntaxError: missing formal parameter
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: