* test: add test for nullish coalescing Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com> * test: add control group * test: add tests for optional chaining Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com> * test: add tests on optional chaining mixed with private class elements * fix: wrap member chains to IIFE when it is in parameter default * chore: add more testcases * chore: update test fixtures * fix: NodePath.get is always non nullish Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
35 lines
769 B
JavaScript
35 lines
769 B
JavaScript
function f(a = (() => {
|
|
var _x;
|
|
|
|
return (_x = x) === null || _x === void 0 ? void 0 : _x.y;
|
|
})()) {}
|
|
|
|
function g({
|
|
a,
|
|
b = a === null || a === void 0 ? void 0 : a.c
|
|
}) {}
|
|
|
|
function h(a, {
|
|
b = (() => {
|
|
var _a$b, _a$b$c;
|
|
|
|
return (_a$b = a.b) === null || _a$b === void 0 ? void 0 : (_a$b$c = _a$b.c) === null || _a$b$c === void 0 ? void 0 : _a$b$c.d.e;
|
|
})()
|
|
}) {}
|
|
|
|
function i(a, {
|
|
b = (() => {
|
|
var _a$b2, _a$b2$c;
|
|
|
|
return (_a$b2 = a.b) === null || _a$b2 === void 0 ? void 0 : (_a$b2$c = _a$b2.c) === null || _a$b2$c === void 0 ? void 0 : _a$b2$c.d;
|
|
})().e
|
|
}) {}
|
|
|
|
function j(a, {
|
|
b = (() => {
|
|
var _a$b3;
|
|
|
|
return a === null || a === void 0 ? void 0 : (_a$b3 = a.b) === null || _a$b3 === void 0 ? void 0 : _a$b3.c().d.e;
|
|
})()
|
|
}) {}
|