-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es/codegen): Emit question token for class methods (#9342)
- Loading branch information
Showing
6 changed files
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
swc_ecma_codegen: patch | ||
swc_ecma_transforms_typescript: patch | ||
--- | ||
|
||
fix(es/codegen): Emit question token for class methods |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
crates/swc_ecma_codegen/tests/fixture/typescript/class_method/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
class MyClass extends Base { | ||
public override method(param: number): string { | ||
} | ||
public abstract override log(msg: string): void; | ||
public abstract override log?<TValue>(msg: string): TValue; | ||
} |
2 changes: 1 addition & 1 deletion
2
crates/swc_ecma_codegen/tests/fixture/typescript/class_method/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
class MyClass extends Base { | ||
public override method(param: number): string {} | ||
public abstract override log(msg: string): void; | ||
public abstract override log?<TValue>(msg: string): TValue; | ||
} |
2 changes: 1 addition & 1 deletion
2
crates/swc_ecma_codegen/tests/fixture/typescript/class_method/output.min.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
class MyClass extends Base{public override method(param:number):string{}public abstract override log(msg:string):void} | ||
class MyClass extends Base{public override method(param:number):string{}public abstract override log?<TValue>(msg:string):TValue} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters