Svelte 5: Cannot specify this
' type in TypeScript
#11731
Labels
Milestone
this
' type in TypeScript
#11731
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: