Skip to content

Commit

Permalink
fix: remove 'implements' from class declaration (#14749)
Browse files Browse the repository at this point in the history
* fix: remove implements from class declaration

* add a smoke test
  • Loading branch information
ciscorn authored Dec 18, 2024
1 parent e38975e commit c79b909
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-maps-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte': patch
---

fix: remove implements from class declarations
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const visitors = {
if (node.declare) {
return b.empty;
}
delete node.implements;
return context.next();
},
VariableDeclaration(node, context) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { test } from '../../assert';

export default test({});
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script lang="ts">
// TypeScript syntax should not cause compilation failure
interface MyInterface {}
class MyClass implements MyInterface {}
</script>

0 comments on commit c79b909

Please sign in to comment.