-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify
?.
output when chain result is ignored (#15871)
- Loading branch information
1 parent
05c4089
commit 7048370
Showing
25 changed files
with
170 additions
and
163 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
...d-parameters-in-optional-chaining/test/fixtures/assumption-noDocumentAll/basic/output.mjs
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 @@ | ||
var _fn, _a, _a2, _a2$b, _a$b, _a3; | ||
(_fn = fn) === null || _fn === void 0 ? void 0 : _fn(...b, 1); | ||
(_a = a) === null || _a === void 0 ? void 0 : _a.b(...c, 1); | ||
(_a2 = a) === null || _a2 === void 0 || (_a2$b = _a2.b) === null || _a2$b === void 0 ? void 0 : _a2$b.call(_a2, ...c, 1); | ||
(_fn = fn) === null || _fn === void 0 || _fn(...b, 1); | ||
(_a = a) === null || _a === void 0 || _a.b(...c, 1); | ||
(_a2 = a) === null || _a2 === void 0 || (_a2$b = _a2.b) === null || _a2$b === void 0 || _a2$b.call(_a2, ...c, 1); | ||
(_a$b = (_a3 = a).b) === null || _a$b === void 0 ? void 0 : _a$b.call(_a3, ...c, 1); |
18 changes: 9 additions & 9 deletions
18
...ameters-in-optional-chaining/test/fixtures/assumption-pureGetters/function-call/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,11 +1,11 @@ | ||
var _foo, _foo2, _foo$bar, _foo3, _foo4, _foo4$bar, _foo5, _foo6, _foo$bar2, _foo7, _foo$bar3, _foo8, _foo9, _foo9$bar, _foo10, _foo10$bar; | ||
(_foo = foo) === null || _foo === void 0 ? void 0 : _foo(...[], 1); | ||
(_foo2 = foo) === null || _foo2 === void 0 ? void 0 : _foo2.bar(...[], 1); | ||
(_foo$bar = (_foo3 = foo).bar) === null || _foo$bar === void 0 ? void 0 : _foo$bar.call(_foo3, foo.bar, ...[], 1); | ||
(_foo4 = foo) === null || _foo4 === void 0 || (_foo4$bar = _foo4.bar) === null || _foo4$bar === void 0 ? void 0 : _foo4$bar.call(_foo4, foo.bar, ...[], 1); | ||
(_foo5 = foo) === null || _foo5 === void 0 ? void 0 : _foo5(...[], 1).bar; | ||
(_foo6 = foo) === null || _foo6 === void 0 || (_foo6 = _foo6(...[], 1)) === null || _foo6 === void 0 ? void 0 : _foo6.bar; | ||
(_foo$bar2 = (_foo7 = foo).bar) === null || _foo$bar2 === void 0 ? void 0 : _foo$bar2.call(_foo7, ...[], 1).baz; | ||
(_foo$bar3 = (_foo8 = foo).bar) === null || _foo$bar3 === void 0 || (_foo$bar3 = _foo$bar3.call(_foo8, ...[], 1)) === null || _foo$bar3 === void 0 ? void 0 : _foo$bar3.baz; | ||
(_foo9 = foo) === null || _foo9 === void 0 || (_foo9$bar = _foo9.bar) === null || _foo9$bar === void 0 ? void 0 : _foo9$bar.call(_foo9, ...[], 1).baz; | ||
(_foo = foo) === null || _foo === void 0 || _foo(...[], 1); | ||
(_foo2 = foo) === null || _foo2 === void 0 || _foo2.bar(...[], 1); | ||
(_foo$bar = (_foo3 = foo).bar) === null || _foo$bar === void 0 || _foo$bar.call(_foo3, foo.bar, ...[], 1); | ||
(_foo4 = foo) === null || _foo4 === void 0 || (_foo4$bar = _foo4.bar) === null || _foo4$bar === void 0 || _foo4$bar.call(_foo4, foo.bar, ...[], 1); | ||
(_foo5 = foo) === null || _foo5 === void 0 || _foo5(...[], 1).bar; | ||
(_foo6 = foo) === null || _foo6 === void 0 || (_foo6 = _foo6(...[], 1)) === null || _foo6 === void 0 || _foo6.bar; | ||
(_foo$bar2 = (_foo7 = foo).bar) === null || _foo$bar2 === void 0 || _foo$bar2.call(_foo7, ...[], 1).baz; | ||
(_foo$bar3 = (_foo8 = foo).bar) === null || _foo$bar3 === void 0 || (_foo$bar3 = _foo$bar3.call(_foo8, ...[], 1)) === null || _foo$bar3 === void 0 || _foo$bar3.baz; | ||
(_foo9 = foo) === null || _foo9 === void 0 || (_foo9$bar = _foo9.bar) === null || _foo9$bar === void 0 || _foo9$bar.call(_foo9, ...[], 1).baz; | ||
(_foo10 = foo) === null || _foo10 === void 0 || (_foo10$bar = _foo10.bar) === null || _foo10$bar === void 0 || (_foo10$bar = _foo10$bar.call(_foo10, ...[], 1)) === null || _foo10$bar === void 0 ? void 0 : _foo10$bar.baz; |
4 changes: 2 additions & 2 deletions
4
...s-in-optional-chaining/test/fixtures/basic/basic-integration-optional-chaining/output.mjs
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 @@ | ||
var _fn, _a, _a2, _a2$b; | ||
(_fn = fn) === null || _fn === void 0 ? void 0 : _fn(...b, 1); | ||
(_a = a) === null || _a === void 0 ? void 0 : _a.b(...c, 1); | ||
(_fn = fn) === null || _fn === void 0 || _fn(...b, 1); | ||
(_a = a) === null || _a === void 0 || _a.b(...c, 1); | ||
(_a2 = a) === null || _a2 === void 0 || (_a2$b = _a2.b) === null || _a2$b === void 0 ? void 0 : _a2$b.call(_a2, ...c, 1); |
6 changes: 3 additions & 3 deletions
6
...gin-bugfix-v8-spread-parameters-in-optional-chaining/test/fixtures/basic/basic/output.mjs
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 @@ | ||
var _fn, _a, _a2, _a2$b, _a$b, _a3; | ||
(_fn = fn) === null || _fn === void 0 ? void 0 : _fn(...b, 1); | ||
(_a = a) === null || _a === void 0 ? void 0 : _a.b(...c, 1); | ||
(_a2 = a) === null || _a2 === void 0 || (_a2$b = _a2.b) === null || _a2$b === void 0 ? void 0 : _a2$b.call(_a2, ...c, 1); | ||
(_fn = fn) === null || _fn === void 0 || _fn(...b, 1); | ||
(_a = a) === null || _a === void 0 || _a.b(...c, 1); | ||
(_a2 = a) === null || _a2 === void 0 || (_a2$b = _a2.b) === null || _a2$b === void 0 || _a2$b.call(_a2, ...c, 1); | ||
(_a$b = (_a3 = a).b) === null || _a$b === void 0 ? void 0 : _a$b.call(_a3, ...c, 1); |
18 changes: 9 additions & 9 deletions
18
.../test/fixtures/private-loose/optional-chain-member-optional-call-with-transform/output.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.