Skip to content

Commit

Permalink
Compress output for optional chain with multiple ?. (#15740)
Browse files Browse the repository at this point in the history
* Compress output for optional chain with multiple `?.`

* Shorter output for optional delete

* Use a single temp variable per optional chain
  • Loading branch information
nicolo-ribaudo committed Jul 4, 2023
1 parent 000737c commit dc2cf48
Show file tree
Hide file tree
Showing 47 changed files with 332 additions and 319 deletions.
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 ? void 0 : (_a2$b = _a2.b) === null || _a2$b === void 0 ? void 0 : _a2$b.call(_a2, ...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);
(_a$b = (_a3 = a).b) === null || _a$b === void 0 ? void 0 : _a$b.call(_a3, ...c, 1);

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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);
(_a2 = a) === null || _a2 === void 0 ? void 0 : (_a2$b = _a2.b) === null || _a2$b === void 0 ? void 0 : _a2$b.call(_a2, ...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);
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 ? void 0 : (_a2$b = _a2.b) === null || _a2$b === void 0 ? void 0 : _a2$b.call(_a2, ...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);
(_a$b = (_a3 = a).b) === null || _a$b === void 0 ? void 0 : _a$b.call(_a3, ...c, 1);
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ class C {
const o = null;
const n = this;
const p = o === null || o === void 0 ? void 0 : o.#m(...c, 1);
const q = n === null || n === void 0 ? void 0 : (_n$m = n.#m) === null || _n$m === void 0 ? void 0 : _n$m.call(n, ...c, 1);
const q = n === null || n === void 0 || (_n$m = n.#m) === null || _n$m === void 0 ? void 0 : _n$m.call(n, ...c, 1);
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dc2cf48

Please sign in to comment.