Debian Codegraph @

packages/babel-plugin-proposal-class-properties/test/fixtures/assumption-noDocumentAll/optional-chain-cast-to-boolean/output.js

raw symbols SCIP
1 class C {
2 static testIf(o) {
3 if (o != null && babelHelpers.classStaticPrivateFieldSpecGet(o, C, _a).b.c.d) {
4 return true;
5 }
6 return false;
7 }
8 static testConditional(o) {
9 return (o == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(o, C, _a).b)?.c.d ? true : false;
10 }
11 static testLoop(o) {
12 while (o != null && babelHelpers.classStaticPrivateFieldSpecGet(o, C, _a).b.c.d) {
13 for (; (o == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(o, C, _a).b.c)?.d;) {
14 let i = 0;
15 do {
16 i++;
17 if (i === 2) {
18 return true;
19 }
20 } while ((o == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(o, C, _a).b)?.c.d);
21 }
22 }
23 return false;
24 }
25 static testNegate(o) {
26 return !!(o == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(o, C, _a).b)?.c.d;
27 }
28 static testIfDeep(o) {
29 var _o$obj;
30 if (((_o$obj = o.obj) == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(_o$obj, C, _a).b)?.c.d) {
31 return true;
32 }
33 return false;
34 }
35 static testConditionalDeep(o) {
36 var _o$obj2;
37 return ((_o$obj2 = o.obj) == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(_o$obj2, C, _a).b)?.c.d ? true : false;
38 }
39 static testLoopDeep(o) {
40 while ((_o$obj3 = o.obj) != null && babelHelpers.classStaticPrivateFieldSpecGet(_o$obj3, C, _a).b.c.d) {
41 var _o$obj3;
42 for (; ((_o$obj4 = o.obj) == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(_o$obj4, C, _a).b.c)?.d;) {
43 var _o$obj4;
44 let i = 0;
45 do {
46 var _o$obj5;
47 i++;
48 if (i === 2) {
49 return true;
50 }
51 } while (((_o$obj5 = o.obj) == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(_o$obj5, C, _a).b)?.c.d);
52 }
53 }
54 return false;
55 }
56 static testNegateDeep(o) {
57 var _o$obj6;
58 return !!((_o$obj6 = o.obj) == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(_o$obj6, C, _a).b)?.c.d;
59 }
60 static testLogicalInIf(o) {
61 if ((o == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(o, C, _a).b)?.c.d && (o == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(o, C, _a))?.b.c.d) {
62 return true;
63 }
64 return false;
65 }
66 static testLogicalInReturn(o) {
67 return (o == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(o, C, _a).b)?.c.d && (o == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(o, C, _a))?.b.c.d;
68 }
69 static testNullishCoalescing(o) {
70 if ((o == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(o, C, _a).b)?.c.non_existent ?? (o == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(o, C, _a).b)?.c.d) {
71 return (o == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(o, C, _a).b)?.c.non_existent ?? (o == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(o, C, _a).b)?.c.d;
72 }
73 return (o == null ? void 0 : babelHelpers.classStaticPrivateFieldSpecGet(o, C, _a).b)?.c.non_existent ?? o;
74 }
75 }
76 var _a = {
77 writable: true,
78 value: {
79 b: {
80 c: {
81 d: 2
82 }
83 }
84 }
85 };
86 C.test();
87 C.testNullish();