fix: ignore typescript abstract methods during code transformation (#15267)

pull/15291/head
Caique Torres 7 months ago committed by GitHub
parent 23ecc364da
commit 21dadfc997
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: ignore typescript abstract methods

@ -118,6 +118,12 @@ const visitors = {
delete node.implements;
return context.next();
},
MethodDefinition(node, context) {
if (node.abstract) {
return b.empty;
}
return context.next();
},
VariableDeclaration(node, context) {
if (node.declare) {
return b.empty;

@ -22,6 +22,11 @@
class MyClass implements Hello {}
abstract class MyAbstractClass {
abstract x(): void;
y() {}
}
declare const declared_const: number;
declare function declared_fn(): void;
declare class declared_class {

Loading…
Cancel
Save