-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(es/compat): impl
pure_getters
for optional_chaining
- Loading branch information
Showing
62 changed files
with
554 additions
and
553 deletions.
There are no files selected for viewing
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
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
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
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,32 +1,24 @@ | ||
// code below dont work | ||
var _a; | ||
var a = {}; | ||
new Promise(function(r) { | ||
var _a; | ||
r((_a = a) === null || _a === void 0 ? void 0 : _a.b); | ||
r(a === null || a === void 0 ? void 0 : a.b); | ||
}).then(function(a) { | ||
var _a; | ||
return (_a = a) === null || _a === void 0 ? void 0 : _a.b; | ||
return a === null || a === void 0 ? void 0 : a.b; | ||
}); | ||
var anony = function() { | ||
var _a; | ||
return (_a = a) === null || _a === void 0 ? void 0 : _a.b; | ||
return a === null || a === void 0 ? void 0 : a.b; | ||
}; | ||
// code below works | ||
var b = (_a = a) === null || _a === void 0 ? void 0 : _a.b; | ||
var b = a === null || a === void 0 ? void 0 : a.b; | ||
function fn() { | ||
var _a; | ||
return (_a = a) === null || _a === void 0 ? void 0 : _a.b; | ||
return a === null || a === void 0 ? void 0 : a.b; | ||
} | ||
setTimeout(function() { | ||
var _a; | ||
return (_a = a) === null || _a === void 0 ? void 0 : _a.b; | ||
return a === null || a === void 0 ? void 0 : a.b; | ||
}, 0); | ||
var anony2 = function anony2() { | ||
var _a; | ||
return (_a = a) === null || _a === void 0 ? void 0 : _a.b; | ||
return a === null || a === void 0 ? void 0 : a.b; | ||
}; | ||
(function() { | ||
var _a; | ||
return (_a = a) === null || _a === void 0 ? void 0 : _a.b; | ||
return a === null || a === void 0 ? void 0 : a.b; | ||
})(); |
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 +1 @@ | ||
"use strict";var _a;var a=undefined;(_a=a)===null||_a===void 0?void 0:_a.b.c; | ||
"use strict";var a=undefined;a===null||a===void 0?void 0:a.b.c; |
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 +1 @@ | ||
"use strict";var _a;var a=undefined;(_a=a)===null||_a===void 0?void 0:_a.b.c; | ||
"use strict";var a=undefined;a===null||a===void 0?void 0:a.b.c; |
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
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,86 +1,86 @@ | ||
//// [callChain.ts] | ||
var _o2, _o21, _o22, _o23, _o3_b, _o3_b1, _o3_b2, _o3_b3, _o3_b4, _o3_b5; | ||
var _o1, _o11, _o12, _o13, _o24, _o25, _o26, _o27, _o28, _o29, _o210, _o211, _o3_b6, _o3, _o3_b7, _o31, _o3_b8, _o32, _o3_b9, _o33, _o3_b10, _o34, _o3_b11, _o35, _o3_b12, _o36, _o3_b13, _o37, _o3_b14, _o38, _o3_b15, _o39, _o3_b16, _o310, _o3_b17, _o311, _o4, _o5, // GH#36031 | ||
_o212, _o213; | ||
(_o1 = o1) === null || _o1 === void 0 ? void 0 : _o1(); | ||
(_o11 = o1) === null || _o11 === void 0 ? void 0 : _o11(1); | ||
(_o12 = o1) === null || _o12 === void 0 ? void 0 : _o12.apply(void 0, [ | ||
var _o3_b6, _o3_b7, _o3_b8, _o3_b9, _o3_b10, _o3_b11, _o3_b12, _o3_b13, _o3_b14, _o3_b15, _o3_b16, _o3_b17, _o5; | ||
o1 === null || o1 === void 0 ? void 0 : o1(); | ||
o1 === null || o1 === void 0 ? void 0 : o1(1); | ||
o1 === null || o1 === void 0 ? void 0 : o1.apply(void 0, [ | ||
1, | ||
2 | ||
]); | ||
(_o13 = o1) === null || _o13 === void 0 ? void 0 : _o13.apply(void 0, [ | ||
o1 === null || o1 === void 0 ? void 0 : o1.apply(void 0, [ | ||
1, | ||
2, | ||
3, | ||
4 | ||
]); | ||
(_o24 = o2) === null || _o24 === void 0 ? void 0 : _o24.b(); | ||
(_o25 = o2) === null || _o25 === void 0 ? void 0 : _o25.b(1); | ||
(_o26 = o2) === null || _o26 === void 0 ? void 0 : (_o2 = _o26).b.apply(_o2, [ | ||
o2 === null || o2 === void 0 ? void 0 : o2.b(); | ||
o2 === null || o2 === void 0 ? void 0 : o2.b(1); | ||
o2 === null || o2 === void 0 ? void 0 : (_o2 = o2).b.apply(_o2, [ | ||
1, | ||
2 | ||
]); | ||
(_o27 = o2) === null || _o27 === void 0 ? void 0 : (_o21 = _o27).b.apply(_o21, [ | ||
o2 === null || o2 === void 0 ? void 0 : (_o21 = o2).b.apply(_o21, [ | ||
1, | ||
2, | ||
3, | ||
4 | ||
]); | ||
(_o28 = o2) === null || _o28 === void 0 ? void 0 : _o28["b"](); | ||
(_o29 = o2) === null || _o29 === void 0 ? void 0 : _o29["b"](1); | ||
(_o210 = o2) === null || _o210 === void 0 ? void 0 : (_o22 = _o210)["b"].apply(_o22, [ | ||
o2 === null || o2 === void 0 ? void 0 : o2["b"](); | ||
o2 === null || o2 === void 0 ? void 0 : o2["b"](1); | ||
o2 === null || o2 === void 0 ? void 0 : (_o22 = o2)["b"].apply(_o22, [ | ||
1, | ||
2 | ||
]); | ||
(_o211 = o2) === null || _o211 === void 0 ? void 0 : (_o23 = _o211)["b"].apply(_o23, [ | ||
o2 === null || o2 === void 0 ? void 0 : (_o23 = o2)["b"].apply(_o23, [ | ||
1, | ||
2, | ||
3, | ||
4 | ||
]); | ||
(_o3_b6 = (_o3 = o3).b) === null || _o3_b6 === void 0 ? void 0 : _o3_b6.call(_o3).c; | ||
(_o3_b7 = (_o31 = o3).b) === null || _o3_b7 === void 0 ? void 0 : _o3_b7.call(_o31, 1).c; | ||
(_o3_b8 = (_o32 = o3).b) === null || _o3_b8 === void 0 ? void 0 : (_o3_b = _o3_b8).call.apply(_o3_b, [ | ||
_o32, | ||
(_o3_b6 = o3.b) === null || _o3_b6 === void 0 ? void 0 : _o3_b6.call(o3).c; | ||
(_o3_b7 = o3.b) === null || _o3_b7 === void 0 ? void 0 : _o3_b7.call(o3, 1).c; | ||
(_o3_b8 = o3.b) === null || _o3_b8 === void 0 ? void 0 : (_o3_b = _o3_b8).call.apply(_o3_b, [ | ||
o3, | ||
1, | ||
2 | ||
]).c; | ||
(_o3_b9 = (_o33 = o3).b) === null || _o3_b9 === void 0 ? void 0 : (_o3_b1 = _o3_b9).call.apply(_o3_b1, [ | ||
_o33, | ||
(_o3_b9 = o3.b) === null || _o3_b9 === void 0 ? void 0 : (_o3_b1 = _o3_b9).call.apply(_o3_b1, [ | ||
o3, | ||
1, | ||
2, | ||
3, | ||
4 | ||
]).c; | ||
(_o3_b10 = (_o34 = o3).b) === null || _o3_b10 === void 0 ? void 0 : _o3_b10.call(_o34)["c"]; | ||
(_o3_b11 = (_o35 = o3).b) === null || _o3_b11 === void 0 ? void 0 : _o3_b11.call(_o35, 1)["c"]; | ||
(_o3_b12 = (_o36 = o3).b) === null || _o3_b12 === void 0 ? void 0 : (_o3_b2 = _o3_b12).call.apply(_o3_b2, [ | ||
_o36, | ||
(_o3_b10 = o3.b) === null || _o3_b10 === void 0 ? void 0 : _o3_b10.call(o3)["c"]; | ||
(_o3_b11 = o3.b) === null || _o3_b11 === void 0 ? void 0 : _o3_b11.call(o3, 1)["c"]; | ||
(_o3_b12 = o3.b) === null || _o3_b12 === void 0 ? void 0 : (_o3_b2 = _o3_b12).call.apply(_o3_b2, [ | ||
o3, | ||
1, | ||
2 | ||
])["c"]; | ||
(_o3_b13 = (_o37 = o3).b) === null || _o3_b13 === void 0 ? void 0 : (_o3_b3 = _o3_b13).call.apply(_o3_b3, [ | ||
_o37, | ||
(_o3_b13 = o3.b) === null || _o3_b13 === void 0 ? void 0 : (_o3_b3 = _o3_b13).call.apply(_o3_b3, [ | ||
o3, | ||
1, | ||
2, | ||
3, | ||
4 | ||
])["c"]; | ||
(_o3_b14 = (_o38 = o3)["b"]) === null || _o3_b14 === void 0 ? void 0 : _o3_b14.call(_o38).c; | ||
(_o3_b15 = (_o39 = o3)["b"]) === null || _o3_b15 === void 0 ? void 0 : _o3_b15.call(_o39, 1).c; | ||
(_o3_b16 = (_o310 = o3)["b"]) === null || _o3_b16 === void 0 ? void 0 : (_o3_b4 = _o3_b16).call.apply(_o3_b4, [ | ||
_o310, | ||
(_o3_b14 = o3["b"]) === null || _o3_b14 === void 0 ? void 0 : _o3_b14.call(o3).c; | ||
(_o3_b15 = o3["b"]) === null || _o3_b15 === void 0 ? void 0 : _o3_b15.call(o3, 1).c; | ||
(_o3_b16 = o3["b"]) === null || _o3_b16 === void 0 ? void 0 : (_o3_b4 = _o3_b16).call.apply(_o3_b4, [ | ||
o3, | ||
1, | ||
2 | ||
]).c; | ||
(_o3_b17 = (_o311 = o3)["b"]) === null || _o3_b17 === void 0 ? void 0 : (_o3_b5 = _o3_b17).call.apply(_o3_b5, [ | ||
_o311, | ||
(_o3_b17 = o3["b"]) === null || _o3_b17 === void 0 ? void 0 : (_o3_b5 = _o3_b17).call.apply(_o3_b5, [ | ||
o3, | ||
1, | ||
2, | ||
3, | ||
4 | ||
]).c; | ||
var v = (_o4 = o4) === null || _o4 === void 0 ? void 0 : _o4(incr); | ||
var v = o4 === null || o4 === void 0 ? void 0 : o4(incr); | ||
(_o5 = o5()) === null || _o5 === void 0 ? void 0 : _o5(); | ||
(_o212 = o2) === null || _o212 === void 0 ? void 0 : _o212.b().toString; | ||
(_o213 = o2) === null || _o213 === void 0 ? void 0 : _o213.b().toString; | ||
// GH#36031 | ||
o2 === null || o2 === void 0 ? void 0 : o2.b().toString; | ||
o2 === null || o2 === void 0 ? void 0 : o2.b().toString; |
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 @@ | ||
//// [callChain.2.ts] | ||
var _o1, _o2, _o3_b, _o3; | ||
(_o1 = o1) === null || _o1 === void 0 ? void 0 : _o1(); | ||
(_o2 = o2) === null || _o2 === void 0 ? void 0 : _o2.b(); | ||
(_o3_b = (_o3 = o3).b) === null || _o3_b === void 0 ? void 0 : _o3_b.call(_o3).c; | ||
var _o3_b; | ||
o1 === null || o1 === void 0 ? void 0 : o1(); | ||
o2 === null || o2 === void 0 ? void 0 : o2.b(); | ||
(_o3_b = o3.b) === null || _o3_b === void 0 ? void 0 : _o3_b.call(o3).c; |
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,3 +1,3 @@ | ||
//// [callChain.2.ts] | ||
var _o1, _o2, _o3_b, _o3; | ||
null === (_o1 = o1) || void 0 === _o1 || _o1(), null === (_o2 = o2) || void 0 === _o2 || _o2.b(), null === (_o3_b = (_o3 = o3).b) || void 0 === _o3_b || _o3_b.call(_o3).c; | ||
var _o3_b; | ||
null == o1 || o1(), null == o2 || o2.b(), null === (_o3_b = o3.b) || void 0 === _o3_b || _o3_b.call(o3).c; |
Oops, something went wrong.