a?.b.c() produces different result than a?.b!.c() #10959
Labels
area: typescript
Has PR
i: bug
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
pkg: parser
Spec: Optional Chaining
Bug Report
Input Code
Actual behavior
Expected behavior/code
The
!
should have no effect on the produced code.Problem: Suppose
a
is null, then the second line can be reduced to:Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
babel.config.js
Environment
Possible Solution
¯\_(ツ)_/
Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.
The text was updated successfully, but these errors were encountered: