-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
Compiling an abstract class with an abstract method does not remove the abstract method from the JS output, instead just removing the abstract keyword and all types. This produces a runtime SyntaxError. This only occurs within .svelte components and not in normal TypeScript.
A temporary workaround is to simply remove the abstracts and define a method body that errors, or by extracting the class into a .svelte.ts file where this issue does not occur.
Reproduction
Logs
System Info
System:
OS: Linux 6.6 cpe:/o:nixos:nixos:25.05 25.05 (Warbler)
CPU: (32) x64 13th Gen Intel(R) Core(TM) i9-13900HX
Memory: 16.25 GB / 31.19 GB
Container: Yes
Shell: 5.2.37 - /nix/store/0irlcqx2n3qm6b1pc9rsd2i8qpvcccaj-bash-5.2p37/bin/bash
Binaries:
Node: 20.18.0 - /nix/store/z0ivg3dbal4sk5h0c7p1pfkxc7ff98ri-nodejs-20.18.0/bin/node
npm: 10.8.2 - /nix/store/z0ivg3dbal4sk5h0c7p1pfkxc7ff98ri-nodejs-20.18.0/bin/npm
pnpm: 9.12.3 - /nix/store/3xd8lpj86wbjkvxd2qjd28fd98gqsypc-pnpm-9.12.3/bin/pnpm
Browsers:
Chromium: 131.0.6778.204
npmPackages:
svelte: ^5.19.0 => 5.19.8Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels