-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Describe the bug
The overloads for private ECMAScript methods are not stripped, causing a syntax error when trying to run the resulting JavaScript.
Input code
class Private {
#foo(bar: string): string;
#foo(bar: number): number;
#foo(bar: string | number): string | number;
#foo(bar: string | number): string | number {
return bar;
}
}Config
Link to the code that reproduces this issue
SWC Info output
No response
Expected behavior
class Private {
#foo(bar ) {
return bar;
}
}Actual behavior
class Private {
#foo(bar ) ;
#foo(bar ) ;
#foo(bar ) ;
#foo(bar ) {
return bar;
}
}Version
1.12.14
Additional context
First reported in nodejs/node#59102.