TypeScript non-null assertion operator not stripped off with deep optional chaining #12386
Closed
1 task
Labels
area: typescript
i: bug
i: regression
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
pkg: traverse
Spec: Optional Chaining
Bug Report
I noticed a really strange regression in in @babel/core 7.12.7. When used with optional chaining, the TypeScript postfix "!" operator (non-null assertion) sometimes won't get stripped off, resulting in a syntax error.
Input:
Output with @babel/core@7.12.3:
Output with @babel/core@7.12.7:
Notice the
_a$b.c!.d
at the endPlugins used:
The text was updated successfully, but these errors were encountered: