Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/famous-mugs-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte': patch
---

fix: remove unwanted properties from both replaced and unreplaced nodes
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ function remove_this_param(node, context) {
/** @type {Visitors<any, null>} */
const visitors = {
_(node, context) {
context.next();
const n = context.next() ?? node;

// TODO there may come a time when we decide to preserve type annotations.
// until that day comes, we just delete them so they don't confuse esrap
delete node.typeAnnotation;
delete node.typeParameters;
delete node.returnType;
delete node.accessibility;
delete n.typeAnnotation;
delete n.typeParameters;
delete n.returnType;
delete n.accessibility;
},
Decorator(node) {
e.typescript_invalid_feature(node, 'decorators (related TSC proposal is not stage 4 yet)');
Expand Down
Loading