Test not-top-level optional chaining

This commit is contained in:
Justin Ridgewell
2017-06-04 01:46:14 -04:00
parent 1f22ac353a
commit ef87acc389
2 changed files with 9 additions and 1 deletions

View File

@@ -2,6 +2,10 @@ foo?.bar
a?.b.c?.d.e
a.b?.c.d?.e
a.b.c?.d?.e
orders?.[0].price
orders?.[0]?.price

View File

@@ -1,9 +1,13 @@
var _foo, _a, _a$b$c, _orders, _orders2, _orders2$, _client, _orders$client$key;
var _foo, _a, _a$b$c, _a$b, _a$b$c$d, _a$b$c2, _a$b$c2$d, _orders, _orders2, _orders2$, _client, _orders$client$key;
(_foo = foo) == null ? void 0 : _foo.bar;
(_a = a) == null ? void 0 : (_a$b$c = _a.b.c) == null ? void 0 : _a$b$c.d.e;
(_a$b = a.b) == null ? void 0 : (_a$b$c$d = _a$b.c.d) == null ? void 0 : _a$b$c$d.e;
(_a$b$c2 = a.b.c) == null ? void 0 : (_a$b$c2$d = _a$b$c2.d) == null ? void 0 : _a$b$c2$d.e;
(_orders = orders) == null ? void 0 : _orders[0].price;
(_orders2 = orders) == null ? void 0 : (_orders2$ = _orders2[0]) == null ? void 0 : _orders2$.price;