You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using @swc/wasm-typescript (strip-types mode), with input that contains an async arrow function that also has a type parameter that spans multiple lines the output JavaScript includes a syntax error.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Describe the bug
Using
@swc/wasm-typescript
(strip-types mode), with input that contains an async arrow function that also has a type parameter that spans multiple lines the output JavaScript includes a syntax error.Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.7.40&code=H4sIAAAAAAAAA8tJLVFIU7BVSCyuzEtWsOFSUFAI4bLTKLNSCNFUsLVTKLPmAgD0%2BerKIwAAAA%3D%3D&config=H4sIAAAAAAAAA1WPSw7DIAxE9zkF8rqLikUXvUMPgagTUfETdqSiKHcvJEDbHZ5h%2FMbbJAS8SMNdbOVZhqgSYRpzUSh7Vu%2BiAOeIpJOJDJfuMlVrVpbwkPbTAVZpQa4pJHmVsiXAhkBYZE4rNskZb%2Bb8i9TBxYREffOgOeUXi%2F%2FAqUHBhed6mO2UWvcscIPvpw4bi8HQoydrq2n%2FALtj80kWAQAA&strip-types=
SWC Info output
N/A
Expected behavior
The output to not contain a new line after the
async
keyword. e.g:Actual behavior
Version
1.7.40
Additional context
This edge case was originally found by @seralexeev and reported on
ts-blank-space
which hit the same issue: bloomberg/ts-blank-space#19The text was updated successfully, but these errors were encountered: