From c0f9de6d2cdbc0099943e7493e8c412bd449e56a Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 8 Dec 2015 13:55:13 -0800 Subject: [PATCH] Test case for ForOf statement with object binding pattern --- ...nDestructuringForOfObjectBindingPattern.js | 130 ++ ...tructuringForOfObjectBindingPattern.js.map | 2 + ...ingForOfObjectBindingPattern.sourcemap.txt | 1809 +++++++++++++++++ ...ructuringForOfObjectBindingPattern.symbols | 259 +++ ...structuringForOfObjectBindingPattern.types | 329 +++ ...nDestructuringForOfObjectBindingPattern.ts | 68 + 6 files changed, 2597 insertions(+) create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js.map create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.sourcemap.txt create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.symbols create mode 100644 tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.types create mode 100644 tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern.ts diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js new file mode 100644 index 0000000000..247e23ff1f --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js @@ -0,0 +1,130 @@ +//// [sourceMapValidationDestructuringForOfObjectBindingPattern.ts] +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; + +function getRobots() { + return robots; +} + +function getMultiRobots() { + return multiRobots; +} + +for (let {name: nameA } of robots) { + console.log(nameA); +} +for (let {name: nameA } of getRobots()) { + console.log(nameA); +} +for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(primaryA); +} + +for (let {name: nameA, skill: skillA } of robots) { + console.log(nameA); +} +for (let {name: nameA, skill: skillA } of getRobots()) { + console.log(nameA); +} +for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + console.log(nameA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + console.log(nameA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(nameA); +} + +//// [sourceMapValidationDestructuringForOfObjectBindingPattern.js] +var robots = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +var multiRobots = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +function getRobots() { + return robots; +} +function getMultiRobots() { + return multiRobots; +} +for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { + var nameA = robots_1[_i].name; + console.log(nameA); +} +for (var _a = 0, _b = getRobots(); _a < _b.length; _a++) { + var nameA = _b[_a].name; + console.log(nameA); +} +for (var _c = 0, _d = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _c < _d.length; _c++) { + var nameA = _d[_c].name; + console.log(nameA); +} +for (var _e = 0, multiRobots_1 = multiRobots; _e < multiRobots_1.length; _e++) { + var _f = multiRobots_1[_e].skills, primaryA = _f.primary, secondaryA = _f.secondary; + console.log(primaryA); +} +for (var _g = 0, _h = getMultiRobots(); _g < _h.length; _g++) { + var _j = _h[_g].skills, primaryA = _j.primary, secondaryA = _j.secondary; + console.log(primaryA); +} +for (var _k = 0, _l = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _k < _l.length; _k++) { + var _m = _l[_k].skills, primaryA = _m.primary, secondaryA = _m.secondary; + console.log(primaryA); +} +for (var _o = 0, robots_2 = robots; _o < robots_2.length; _o++) { + var _p = robots_2[_o], nameA = _p.name, skillA = _p.skill; + console.log(nameA); +} +for (var _q = 0, _r = getRobots(); _q < _r.length; _q++) { + var _s = _r[_q], nameA = _s.name, skillA = _s.skill; + console.log(nameA); +} +for (var _t = 0, _u = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _t < _u.length; _t++) { + var _v = _u[_t], nameA = _v.name, skillA = _v.skill; + console.log(nameA); +} +for (var _w = 0, multiRobots_2 = multiRobots; _w < multiRobots_2.length; _w++) { + var _x = multiRobots_2[_w], nameA = _x.name, _y = _x.skills, primaryA = _y.primary, secondaryA = _y.secondary; + console.log(nameA); +} +for (var _z = 0, _0 = getMultiRobots(); _z < _0.length; _z++) { + var _1 = _0[_z], nameA = _1.name, _2 = _1.skills, primaryA = _2.primary, secondaryA = _2.secondary; + console.log(nameA); +} +for (var _3 = 0, _4 = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _3 < _4.length; _3++) { + var _5 = _4[_3], nameA = _5.name, _6 = _5.skills, primaryA = _6.primary, secondaryA = _6.secondary; + console.log(nameA); +} +//# sourceMappingURL=sourceMapValidationDestructuringForOfObjectBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js.map new file mode 100644 index 0000000000..3f8182d437 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForOfObjectBindingPattern.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForOfObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForOfObjectBindingPattern.ts"],"names":[],"mappings":"AAgBA,IAAI,MAAM,GAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AACnG,IAAI,WAAW,GAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IAChG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;AAE/E;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC;AAED,GAAG,CAAC,CAAuB,UAAM,EAAN,iBAAM,EAA5B,oBAAkB,EAAlB,IAA4B,CAAC;IAA7B,IAAI,yBAAc;IACnB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAuB,UAAW,EAAX,KAAA,SAAS,EAAE,EAAjC,cAAkB,EAAlB,IAAiC,CAAC;IAAlC,IAAI,mBAAc;IACnB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAuB,UAA4E,EAA5E,MAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAlG,cAAkB,EAAlB,IAAkG,CAAC;IAAnG,IAAI,mBAAc;IACnB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAiE,UAAW,EAAX,2BAAW,EAA3E,yBAA4D,EAA5D,IAA2E,CAAC;IAA5E,IAAM,6BAAM,EAAI,qBAAiB,EAAE,yBAAqB;IACzD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;CACzB;AACD,GAAG,CAAC,CAAiE,UAAgB,EAAhB,KAAA,cAAc,EAAE,EAAhF,cAA4D,EAA5D,IAAgF,CAAC;IAAjF,IAAM,kBAAM,EAAI,qBAAiB,EAAE,yBAAqB;IACzD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;CACzB;AACD,GAAG,CAAC,CAAiE,UACS,EADT,MAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IACrI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,EADzE,cAA4D,EAA5D,IACyE,CAAC;IAD1E,IAAM,kBAAM,EAAI,qBAAiB,EAAE,yBAAqB;IAEzD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;CACzB;AAED,GAAG,CAAC,CAAsC,UAAM,EAAN,iBAAM,EAA3C,oBAAiC,EAAjC,IAA2C,CAAC;IAA5C,uBAAK,eAAW,EAAE,iBAAa;IAChC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAsC,UAAW,EAAX,KAAA,SAAS,EAAE,EAAhD,cAAiC,EAAjC,IAAgD,CAAC;IAAjD,iBAAK,eAAW,EAAE,iBAAa;IAChC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAAsC,UAA4E,EAA5E,MAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAjH,cAAiC,EAAjC,IAAiH,CAAC;IAAlH,iBAAK,eAAW,EAAE,iBAAa;IAChC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA6E,UAAW,EAAX,2BAAW,EAAvF,yBAAwE,EAAxE,IAAuF,CAAC;IAAxF,4BAAK,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB;IACrE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA6E,UAAgB,EAAhB,KAAA,cAAc,EAAE,EAA5F,cAAwE,EAAxE,IAA4F,CAAC;IAA7F,iBAAK,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB;IACrE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;AACD,GAAG,CAAC,CAA6E,UACH,EADG,MAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IACjJ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,EADzE,cAAwE,EAAxE,IACyE,CAAC;IAD1E,iBAAK,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB;IAErE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.sourcemap.txt new file mode 100644 index 0000000000..42b9853cc0 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.sourcemap.txt @@ -0,0 +1,1809 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForOfObjectBindingPattern.js +mapUrl: sourceMapValidationDestructuringForOfObjectBindingPattern.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForOfObjectBindingPattern.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern.js +sourceFile:sourceMapValidationDestructuringForOfObjectBindingPattern.ts +------------------------------------------------------------------- +>>>var robots = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^ +7 > ^^^^ +8 > ^^ +9 > ^^^^^^^ +10> ^^ +11> ^^^^^ +12> ^^ +13> ^^^^^^^^ +14> ^^ +15> ^^ +16> ^^ +17> ^^^^ +18> ^^ +19> ^^^^^^^^^ +20> ^^ +21> ^^^^^ +22> ^^ +23> ^^^^^^^^^^ +24> ^^ +25> ^ +26> ^ +1 >declare var console: { + > log(msg: any): void; + >} + >interface Robot { + > name: string; + > skill: string; + >} + > + >interface MultiRobot { + > name: string; + > skills: { + > primary: string; + > secondary: string; + > }; + >} + > + > +2 >let +3 > robots +4 > : Robot[] = +5 > [ +6 > { +7 > name +8 > : +9 > "mower" +10> , +11> skill +12> : +13> "mowing" +14> } +15> , +16> { +17> name +18> : +19> "trimmer" +20> , +21> skill +22> : +23> "trimming" +24> } +25> ] +26> ; +1 >Emitted(1, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(17, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(17, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(17, 23) + SourceIndex(0) +5 >Emitted(1, 15) Source(17, 24) + SourceIndex(0) +6 >Emitted(1, 17) Source(17, 26) + SourceIndex(0) +7 >Emitted(1, 21) Source(17, 30) + SourceIndex(0) +8 >Emitted(1, 23) Source(17, 32) + SourceIndex(0) +9 >Emitted(1, 30) Source(17, 39) + SourceIndex(0) +10>Emitted(1, 32) Source(17, 41) + SourceIndex(0) +11>Emitted(1, 37) Source(17, 46) + SourceIndex(0) +12>Emitted(1, 39) Source(17, 48) + SourceIndex(0) +13>Emitted(1, 47) Source(17, 56) + SourceIndex(0) +14>Emitted(1, 49) Source(17, 58) + SourceIndex(0) +15>Emitted(1, 51) Source(17, 60) + SourceIndex(0) +16>Emitted(1, 53) Source(17, 62) + SourceIndex(0) +17>Emitted(1, 57) Source(17, 66) + SourceIndex(0) +18>Emitted(1, 59) Source(17, 68) + SourceIndex(0) +19>Emitted(1, 68) Source(17, 77) + SourceIndex(0) +20>Emitted(1, 70) Source(17, 79) + SourceIndex(0) +21>Emitted(1, 75) Source(17, 84) + SourceIndex(0) +22>Emitted(1, 77) Source(17, 86) + SourceIndex(0) +23>Emitted(1, 87) Source(17, 96) + SourceIndex(0) +24>Emitted(1, 89) Source(17, 98) + SourceIndex(0) +25>Emitted(1, 90) Source(17, 99) + SourceIndex(0) +26>Emitted(1, 91) Source(17, 100) + SourceIndex(0) +--- +>>>var multiRobots = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1 > +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^ +7 > ^^^^ +8 > ^^ +9 > ^^^^^^^ +10> ^^ +11> ^^^^^^ +12> ^^ +13> ^^ +14> ^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^^^^^^^^ +19> ^^ +20> ^^^^^^ +21> ^^ +22> ^^ +1 > + > +2 >let +3 > multiRobots +4 > : MultiRobot[] = +5 > [ +6 > { +7 > name +8 > : +9 > "mower" +10> , +11> skills +12> : +13> { +14> primary +15> : +16> "mowing" +17> , +18> secondary +19> : +20> "none" +21> } +22> } +1 >Emitted(2, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(18, 5) + SourceIndex(0) +3 >Emitted(2, 16) Source(18, 16) + SourceIndex(0) +4 >Emitted(2, 19) Source(18, 33) + SourceIndex(0) +5 >Emitted(2, 20) Source(18, 34) + SourceIndex(0) +6 >Emitted(2, 22) Source(18, 36) + SourceIndex(0) +7 >Emitted(2, 26) Source(18, 40) + SourceIndex(0) +8 >Emitted(2, 28) Source(18, 42) + SourceIndex(0) +9 >Emitted(2, 35) Source(18, 49) + SourceIndex(0) +10>Emitted(2, 37) Source(18, 51) + SourceIndex(0) +11>Emitted(2, 43) Source(18, 57) + SourceIndex(0) +12>Emitted(2, 45) Source(18, 59) + SourceIndex(0) +13>Emitted(2, 47) Source(18, 61) + SourceIndex(0) +14>Emitted(2, 54) Source(18, 68) + SourceIndex(0) +15>Emitted(2, 56) Source(18, 70) + SourceIndex(0) +16>Emitted(2, 64) Source(18, 78) + SourceIndex(0) +17>Emitted(2, 66) Source(18, 80) + SourceIndex(0) +18>Emitted(2, 75) Source(18, 89) + SourceIndex(0) +19>Emitted(2, 77) Source(18, 91) + SourceIndex(0) +20>Emitted(2, 83) Source(18, 97) + SourceIndex(0) +21>Emitted(2, 85) Source(18, 99) + SourceIndex(0) +22>Emitted(2, 87) Source(18, 101) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +1 >^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^ +1 >, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> ; +1 >Emitted(3, 5) Source(19, 5) + SourceIndex(0) +2 >Emitted(3, 7) Source(19, 7) + SourceIndex(0) +3 >Emitted(3, 11) Source(19, 11) + SourceIndex(0) +4 >Emitted(3, 13) Source(19, 13) + SourceIndex(0) +5 >Emitted(3, 22) Source(19, 22) + SourceIndex(0) +6 >Emitted(3, 24) Source(19, 24) + SourceIndex(0) +7 >Emitted(3, 30) Source(19, 30) + SourceIndex(0) +8 >Emitted(3, 32) Source(19, 32) + SourceIndex(0) +9 >Emitted(3, 34) Source(19, 34) + SourceIndex(0) +10>Emitted(3, 41) Source(19, 41) + SourceIndex(0) +11>Emitted(3, 43) Source(19, 43) + SourceIndex(0) +12>Emitted(3, 53) Source(19, 53) + SourceIndex(0) +13>Emitted(3, 55) Source(19, 55) + SourceIndex(0) +14>Emitted(3, 64) Source(19, 64) + SourceIndex(0) +15>Emitted(3, 66) Source(19, 66) + SourceIndex(0) +16>Emitted(3, 74) Source(19, 74) + SourceIndex(0) +17>Emitted(3, 76) Source(19, 76) + SourceIndex(0) +18>Emitted(3, 78) Source(19, 78) + SourceIndex(0) +19>Emitted(3, 79) Source(19, 79) + SourceIndex(0) +20>Emitted(3, 80) Source(19, 80) + SourceIndex(0) +--- +>>>function getRobots() { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +1 >Emitted(4, 1) Source(21, 1) + SourceIndex(0) +--- +>>> return robots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +1->function getRobots() { + > +2 > return +3 > +4 > robots +5 > ; +1->Emitted(5, 5) Source(22, 5) + SourceIndex(0) +2 >Emitted(5, 11) Source(22, 11) + SourceIndex(0) +3 >Emitted(5, 12) Source(22, 12) + SourceIndex(0) +4 >Emitted(5, 18) Source(22, 18) + SourceIndex(0) +5 >Emitted(5, 19) Source(22, 19) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(6, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(6, 2) Source(23, 2) + SourceIndex(0) +--- +>>>function getMultiRobots() { +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +1->Emitted(7, 1) Source(25, 1) + SourceIndex(0) +--- +>>> return multiRobots; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^ +1->function getMultiRobots() { + > +2 > return +3 > +4 > multiRobots +5 > ; +1->Emitted(8, 5) Source(26, 5) + SourceIndex(0) +2 >Emitted(8, 11) Source(26, 11) + SourceIndex(0) +3 >Emitted(8, 12) Source(26, 12) + SourceIndex(0) +4 >Emitted(8, 23) Source(26, 23) + SourceIndex(0) +5 >Emitted(8, 24) Source(26, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(9, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(27, 2) + SourceIndex(0) +--- +>>>for (var _i = 0, robots_1 = robots; _i < robots_1.length; _i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +1-> + > + > +2 >for +3 > +4 > (let {name: nameA } of +5 > robots +6 > +7 > robots +8 > +9 > let {name: nameA } +10> +11> let {name: nameA } of robots +12> ) +1->Emitted(10, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(10, 4) Source(29, 4) + SourceIndex(0) +3 >Emitted(10, 5) Source(29, 5) + SourceIndex(0) +4 >Emitted(10, 6) Source(29, 28) + SourceIndex(0) +5 >Emitted(10, 16) Source(29, 34) + SourceIndex(0) +6 >Emitted(10, 18) Source(29, 28) + SourceIndex(0) +7 >Emitted(10, 35) Source(29, 34) + SourceIndex(0) +8 >Emitted(10, 37) Source(29, 6) + SourceIndex(0) +9 >Emitted(10, 57) Source(29, 24) + SourceIndex(0) +10>Emitted(10, 59) Source(29, 6) + SourceIndex(0) +11>Emitted(10, 63) Source(29, 34) + SourceIndex(0) +12>Emitted(10, 64) Source(29, 35) + SourceIndex(0) +--- +>>> var nameA = robots_1[_i].name; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > let +3 > {name: nameA } +1 >Emitted(11, 5) Source(29, 6) + SourceIndex(0) +2 >Emitted(11, 9) Source(29, 10) + SourceIndex(0) +3 >Emitted(11, 34) Source(29, 24) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(12, 5) Source(30, 5) + SourceIndex(0) +2 >Emitted(12, 12) Source(30, 12) + SourceIndex(0) +3 >Emitted(12, 13) Source(30, 13) + SourceIndex(0) +4 >Emitted(12, 16) Source(30, 16) + SourceIndex(0) +5 >Emitted(12, 17) Source(30, 17) + SourceIndex(0) +6 >Emitted(12, 22) Source(30, 22) + SourceIndex(0) +7 >Emitted(12, 23) Source(30, 23) + SourceIndex(0) +8 >Emitted(12, 24) Source(30, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(13, 2) Source(31, 2) + SourceIndex(0) +--- +>>>for (var _a = 0, _b = getRobots(); _a < _b.length; _a++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +1-> + > +2 >for +3 > +4 > (let {name: nameA } of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> let {name: nameA } +12> +13> let {name: nameA } of getRobots() +14> ) +1->Emitted(14, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(14, 4) Source(32, 4) + SourceIndex(0) +3 >Emitted(14, 5) Source(32, 5) + SourceIndex(0) +4 >Emitted(14, 6) Source(32, 28) + SourceIndex(0) +5 >Emitted(14, 16) Source(32, 39) + SourceIndex(0) +6 >Emitted(14, 18) Source(32, 28) + SourceIndex(0) +7 >Emitted(14, 23) Source(32, 28) + SourceIndex(0) +8 >Emitted(14, 32) Source(32, 37) + SourceIndex(0) +9 >Emitted(14, 34) Source(32, 39) + SourceIndex(0) +10>Emitted(14, 36) Source(32, 6) + SourceIndex(0) +11>Emitted(14, 50) Source(32, 24) + SourceIndex(0) +12>Emitted(14, 52) Source(32, 6) + SourceIndex(0) +13>Emitted(14, 56) Source(32, 39) + SourceIndex(0) +14>Emitted(14, 57) Source(32, 40) + SourceIndex(0) +--- +>>> var nameA = _b[_a].name; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +1 > +2 > let +3 > {name: nameA } +1 >Emitted(15, 5) Source(32, 6) + SourceIndex(0) +2 >Emitted(15, 9) Source(32, 10) + SourceIndex(0) +3 >Emitted(15, 28) Source(32, 24) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(16, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(16, 12) Source(33, 12) + SourceIndex(0) +3 >Emitted(16, 13) Source(33, 13) + SourceIndex(0) +4 >Emitted(16, 16) Source(33, 16) + SourceIndex(0) +5 >Emitted(16, 17) Source(33, 17) + SourceIndex(0) +6 >Emitted(16, 22) Source(33, 22) + SourceIndex(0) +7 >Emitted(16, 23) Source(33, 23) + SourceIndex(0) +8 >Emitted(16, 24) Source(33, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(17, 2) Source(34, 2) + SourceIndex(0) +--- +>>>for (var _c = 0, _d = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _c < _d.length; _c++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^ +18> ^^ +19> ^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^^ +25> ^^^^^^^^^^ +26> ^^ +27> ^ +28> ^^ +29> ^^^^^^^^^^^^^^ +30> ^^ +31> ^^^^ +32> ^ +1-> + > +2 >for +3 > +4 > (let {name: nameA } of +5 > [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skill +14> : +15> "mowing" +16> } +17> , +18> { +19> name +20> : +21> "trimmer" +22> , +23> skill +24> : +25> "trimming" +26> } +27> ] +28> +29> let {name: nameA } +30> +31> let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +32> ) +1->Emitted(18, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(18, 4) Source(35, 4) + SourceIndex(0) +3 >Emitted(18, 5) Source(35, 5) + SourceIndex(0) +4 >Emitted(18, 6) Source(35, 28) + SourceIndex(0) +5 >Emitted(18, 16) Source(35, 104) + SourceIndex(0) +6 >Emitted(18, 18) Source(35, 28) + SourceIndex(0) +7 >Emitted(18, 24) Source(35, 29) + SourceIndex(0) +8 >Emitted(18, 26) Source(35, 31) + SourceIndex(0) +9 >Emitted(18, 30) Source(35, 35) + SourceIndex(0) +10>Emitted(18, 32) Source(35, 37) + SourceIndex(0) +11>Emitted(18, 39) Source(35, 44) + SourceIndex(0) +12>Emitted(18, 41) Source(35, 46) + SourceIndex(0) +13>Emitted(18, 46) Source(35, 51) + SourceIndex(0) +14>Emitted(18, 48) Source(35, 53) + SourceIndex(0) +15>Emitted(18, 56) Source(35, 61) + SourceIndex(0) +16>Emitted(18, 58) Source(35, 63) + SourceIndex(0) +17>Emitted(18, 60) Source(35, 65) + SourceIndex(0) +18>Emitted(18, 62) Source(35, 67) + SourceIndex(0) +19>Emitted(18, 66) Source(35, 71) + SourceIndex(0) +20>Emitted(18, 68) Source(35, 73) + SourceIndex(0) +21>Emitted(18, 77) Source(35, 82) + SourceIndex(0) +22>Emitted(18, 79) Source(35, 84) + SourceIndex(0) +23>Emitted(18, 84) Source(35, 89) + SourceIndex(0) +24>Emitted(18, 86) Source(35, 91) + SourceIndex(0) +25>Emitted(18, 96) Source(35, 101) + SourceIndex(0) +26>Emitted(18, 98) Source(35, 103) + SourceIndex(0) +27>Emitted(18, 99) Source(35, 104) + SourceIndex(0) +28>Emitted(18, 101) Source(35, 6) + SourceIndex(0) +29>Emitted(18, 115) Source(35, 24) + SourceIndex(0) +30>Emitted(18, 117) Source(35, 6) + SourceIndex(0) +31>Emitted(18, 121) Source(35, 104) + SourceIndex(0) +32>Emitted(18, 122) Source(35, 105) + SourceIndex(0) +--- +>>> var nameA = _d[_c].name; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +1 > +2 > let +3 > {name: nameA } +1 >Emitted(19, 5) Source(35, 6) + SourceIndex(0) +2 >Emitted(19, 9) Source(35, 10) + SourceIndex(0) +3 >Emitted(19, 28) Source(35, 24) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(20, 5) Source(36, 5) + SourceIndex(0) +2 >Emitted(20, 12) Source(36, 12) + SourceIndex(0) +3 >Emitted(20, 13) Source(36, 13) + SourceIndex(0) +4 >Emitted(20, 16) Source(36, 16) + SourceIndex(0) +5 >Emitted(20, 17) Source(36, 17) + SourceIndex(0) +6 >Emitted(20, 22) Source(36, 22) + SourceIndex(0) +7 >Emitted(20, 23) Source(36, 23) + SourceIndex(0) +8 >Emitted(20, 24) Source(36, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(21, 2) Source(37, 2) + SourceIndex(0) +--- +>>>for (var _e = 0, multiRobots_1 = multiRobots; _e < multiRobots_1.length; _e++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let { skills: { primary: primaryA, secondary: secondaryA } } of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > let { skills: { primary: primaryA, secondary: secondaryA } } +10> +11> let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots +12> ) +1->Emitted(22, 1) Source(38, 1) + SourceIndex(0) +2 >Emitted(22, 4) Source(38, 4) + SourceIndex(0) +3 >Emitted(22, 5) Source(38, 5) + SourceIndex(0) +4 >Emitted(22, 6) Source(38, 70) + SourceIndex(0) +5 >Emitted(22, 16) Source(38, 81) + SourceIndex(0) +6 >Emitted(22, 18) Source(38, 70) + SourceIndex(0) +7 >Emitted(22, 45) Source(38, 81) + SourceIndex(0) +8 >Emitted(22, 47) Source(38, 6) + SourceIndex(0) +9 >Emitted(22, 72) Source(38, 66) + SourceIndex(0) +10>Emitted(22, 74) Source(38, 6) + SourceIndex(0) +11>Emitted(22, 78) Source(38, 81) + SourceIndex(0) +12>Emitted(22, 79) Source(38, 82) + SourceIndex(0) +--- +>>> var _f = multiRobots_1[_e].skills, primaryA = _f.primary, secondaryA = _f.secondary; +1->^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let { +3 > skills +4 > : { +5 > primary: primaryA +6 > , +7 > secondary: secondaryA +1->Emitted(23, 5) Source(38, 6) + SourceIndex(0) +2 >Emitted(23, 9) Source(38, 12) + SourceIndex(0) +3 >Emitted(23, 38) Source(38, 18) + SourceIndex(0) +4 >Emitted(23, 40) Source(38, 22) + SourceIndex(0) +5 >Emitted(23, 61) Source(38, 39) + SourceIndex(0) +6 >Emitted(23, 63) Source(38, 41) + SourceIndex(0) +7 >Emitted(23, 88) Source(38, 62) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } } of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(24, 5) Source(39, 5) + SourceIndex(0) +2 >Emitted(24, 12) Source(39, 12) + SourceIndex(0) +3 >Emitted(24, 13) Source(39, 13) + SourceIndex(0) +4 >Emitted(24, 16) Source(39, 16) + SourceIndex(0) +5 >Emitted(24, 17) Source(39, 17) + SourceIndex(0) +6 >Emitted(24, 25) Source(39, 25) + SourceIndex(0) +7 >Emitted(24, 26) Source(39, 26) + SourceIndex(0) +8 >Emitted(24, 27) Source(39, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(25, 2) Source(40, 2) + SourceIndex(0) +--- +>>>for (var _g = 0, _h = getMultiRobots(); _g < _h.length; _g++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let { skills: { primary: primaryA, secondary: secondaryA } } of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> let { skills: { primary: primaryA, secondary: secondaryA } } +12> +13> let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots() +14> ) +1->Emitted(26, 1) Source(41, 1) + SourceIndex(0) +2 >Emitted(26, 4) Source(41, 4) + SourceIndex(0) +3 >Emitted(26, 5) Source(41, 5) + SourceIndex(0) +4 >Emitted(26, 6) Source(41, 70) + SourceIndex(0) +5 >Emitted(26, 16) Source(41, 86) + SourceIndex(0) +6 >Emitted(26, 18) Source(41, 70) + SourceIndex(0) +7 >Emitted(26, 23) Source(41, 70) + SourceIndex(0) +8 >Emitted(26, 37) Source(41, 84) + SourceIndex(0) +9 >Emitted(26, 39) Source(41, 86) + SourceIndex(0) +10>Emitted(26, 41) Source(41, 6) + SourceIndex(0) +11>Emitted(26, 55) Source(41, 66) + SourceIndex(0) +12>Emitted(26, 57) Source(41, 6) + SourceIndex(0) +13>Emitted(26, 61) Source(41, 86) + SourceIndex(0) +14>Emitted(26, 62) Source(41, 87) + SourceIndex(0) +--- +>>> var _j = _h[_g].skills, primaryA = _j.primary, secondaryA = _j.secondary; +1->^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let { +3 > skills +4 > : { +5 > primary: primaryA +6 > , +7 > secondary: secondaryA +1->Emitted(27, 5) Source(41, 6) + SourceIndex(0) +2 >Emitted(27, 9) Source(41, 12) + SourceIndex(0) +3 >Emitted(27, 27) Source(41, 18) + SourceIndex(0) +4 >Emitted(27, 29) Source(41, 22) + SourceIndex(0) +5 >Emitted(27, 50) Source(41, 39) + SourceIndex(0) +6 >Emitted(27, 52) Source(41, 41) + SourceIndex(0) +7 >Emitted(27, 77) Source(41, 62) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } } of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(28, 5) Source(42, 5) + SourceIndex(0) +2 >Emitted(28, 12) Source(42, 12) + SourceIndex(0) +3 >Emitted(28, 13) Source(42, 13) + SourceIndex(0) +4 >Emitted(28, 16) Source(42, 16) + SourceIndex(0) +5 >Emitted(28, 17) Source(42, 17) + SourceIndex(0) +6 >Emitted(28, 25) Source(42, 25) + SourceIndex(0) +7 >Emitted(28, 26) Source(42, 26) + SourceIndex(0) +8 >Emitted(28, 27) Source(42, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(29, 2) Source(43, 2) + SourceIndex(0) +--- +>>>for (var _k = 0, _l = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^^ +14> ^^ +15> ^^ +16> ^^^^^^^ +17> ^^ +18> ^^^^^^^^ +19> ^^ +20> ^^^^^^^^^ +21> ^^ +22> ^^^^^^ +23> ^^ +24> ^^ +25> ^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let { skills: { primary: primaryA, secondary: secondaryA } } of +5 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skills +14> : +15> { +16> primary +17> : +18> "mowing" +19> , +20> secondary +21> : +22> "none" +23> } +24> } +1->Emitted(30, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(30, 4) Source(44, 4) + SourceIndex(0) +3 >Emitted(30, 5) Source(44, 5) + SourceIndex(0) +4 >Emitted(30, 6) Source(44, 70) + SourceIndex(0) +5 >Emitted(30, 16) Source(45, 79) + SourceIndex(0) +6 >Emitted(30, 18) Source(44, 70) + SourceIndex(0) +7 >Emitted(30, 24) Source(44, 71) + SourceIndex(0) +8 >Emitted(30, 26) Source(44, 73) + SourceIndex(0) +9 >Emitted(30, 30) Source(44, 77) + SourceIndex(0) +10>Emitted(30, 32) Source(44, 79) + SourceIndex(0) +11>Emitted(30, 39) Source(44, 86) + SourceIndex(0) +12>Emitted(30, 41) Source(44, 88) + SourceIndex(0) +13>Emitted(30, 47) Source(44, 94) + SourceIndex(0) +14>Emitted(30, 49) Source(44, 96) + SourceIndex(0) +15>Emitted(30, 51) Source(44, 98) + SourceIndex(0) +16>Emitted(30, 58) Source(44, 105) + SourceIndex(0) +17>Emitted(30, 60) Source(44, 107) + SourceIndex(0) +18>Emitted(30, 68) Source(44, 115) + SourceIndex(0) +19>Emitted(30, 70) Source(44, 117) + SourceIndex(0) +20>Emitted(30, 79) Source(44, 126) + SourceIndex(0) +21>Emitted(30, 81) Source(44, 128) + SourceIndex(0) +22>Emitted(30, 87) Source(44, 134) + SourceIndex(0) +23>Emitted(30, 89) Source(44, 136) + SourceIndex(0) +24>Emitted(30, 91) Source(44, 138) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _k < _l.length; _k++) { +1->^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^^ +21> ^^^^^^^^^^^^^^ +22> ^^ +23> ^^^^ +24> ^ +1->, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> +21> let { skills: { primary: primaryA, secondary: secondaryA } } +22> +23> let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +24> ) +1->Emitted(31, 5) Source(45, 5) + SourceIndex(0) +2 >Emitted(31, 7) Source(45, 7) + SourceIndex(0) +3 >Emitted(31, 11) Source(45, 11) + SourceIndex(0) +4 >Emitted(31, 13) Source(45, 13) + SourceIndex(0) +5 >Emitted(31, 22) Source(45, 22) + SourceIndex(0) +6 >Emitted(31, 24) Source(45, 24) + SourceIndex(0) +7 >Emitted(31, 30) Source(45, 30) + SourceIndex(0) +8 >Emitted(31, 32) Source(45, 32) + SourceIndex(0) +9 >Emitted(31, 34) Source(45, 34) + SourceIndex(0) +10>Emitted(31, 41) Source(45, 41) + SourceIndex(0) +11>Emitted(31, 43) Source(45, 43) + SourceIndex(0) +12>Emitted(31, 53) Source(45, 53) + SourceIndex(0) +13>Emitted(31, 55) Source(45, 55) + SourceIndex(0) +14>Emitted(31, 64) Source(45, 64) + SourceIndex(0) +15>Emitted(31, 66) Source(45, 66) + SourceIndex(0) +16>Emitted(31, 74) Source(45, 74) + SourceIndex(0) +17>Emitted(31, 76) Source(45, 76) + SourceIndex(0) +18>Emitted(31, 78) Source(45, 78) + SourceIndex(0) +19>Emitted(31, 79) Source(45, 79) + SourceIndex(0) +20>Emitted(31, 81) Source(44, 6) + SourceIndex(0) +21>Emitted(31, 95) Source(44, 66) + SourceIndex(0) +22>Emitted(31, 97) Source(44, 6) + SourceIndex(0) +23>Emitted(31, 101) Source(45, 79) + SourceIndex(0) +24>Emitted(31, 102) Source(45, 80) + SourceIndex(0) +--- +>>> var _m = _l[_k].skills, primaryA = _m.primary, secondaryA = _m.secondary; +1 >^^^^ +2 > ^^^^ +3 > ^^^^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > let { +3 > skills +4 > : { +5 > primary: primaryA +6 > , +7 > secondary: secondaryA +1 >Emitted(32, 5) Source(44, 6) + SourceIndex(0) +2 >Emitted(32, 9) Source(44, 12) + SourceIndex(0) +3 >Emitted(32, 27) Source(44, 18) + SourceIndex(0) +4 >Emitted(32, 29) Source(44, 22) + SourceIndex(0) +5 >Emitted(32, 50) Source(44, 39) + SourceIndex(0) +6 >Emitted(32, 52) Source(44, 41) + SourceIndex(0) +7 >Emitted(32, 77) Source(44, 62) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(33, 5) Source(46, 5) + SourceIndex(0) +2 >Emitted(33, 12) Source(46, 12) + SourceIndex(0) +3 >Emitted(33, 13) Source(46, 13) + SourceIndex(0) +4 >Emitted(33, 16) Source(46, 16) + SourceIndex(0) +5 >Emitted(33, 17) Source(46, 17) + SourceIndex(0) +6 >Emitted(33, 25) Source(46, 25) + SourceIndex(0) +7 >Emitted(33, 26) Source(46, 26) + SourceIndex(0) +8 >Emitted(33, 27) Source(46, 27) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(34, 2) Source(47, 2) + SourceIndex(0) +--- +>>>for (var _o = 0, robots_2 = robots; _o < robots_2.length; _o++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +1-> + > + > +2 >for +3 > +4 > (let {name: nameA, skill: skillA } of +5 > robots +6 > +7 > robots +8 > +9 > let {name: nameA, skill: skillA } +10> +11> let {name: nameA, skill: skillA } of robots +12> ) +1->Emitted(35, 1) Source(49, 1) + SourceIndex(0) +2 >Emitted(35, 4) Source(49, 4) + SourceIndex(0) +3 >Emitted(35, 5) Source(49, 5) + SourceIndex(0) +4 >Emitted(35, 6) Source(49, 43) + SourceIndex(0) +5 >Emitted(35, 16) Source(49, 49) + SourceIndex(0) +6 >Emitted(35, 18) Source(49, 43) + SourceIndex(0) +7 >Emitted(35, 35) Source(49, 49) + SourceIndex(0) +8 >Emitted(35, 37) Source(49, 6) + SourceIndex(0) +9 >Emitted(35, 57) Source(49, 39) + SourceIndex(0) +10>Emitted(35, 59) Source(49, 6) + SourceIndex(0) +11>Emitted(35, 63) Source(49, 49) + SourceIndex(0) +12>Emitted(35, 64) Source(49, 50) + SourceIndex(0) +--- +>>> var _p = robots_2[_o], nameA = _p.name, skillA = _p.skill; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^ +1 > +2 > let { +3 > name: nameA +4 > , +5 > skill: skillA +1 >Emitted(36, 5) Source(49, 6) + SourceIndex(0) +2 >Emitted(36, 28) Source(49, 11) + SourceIndex(0) +3 >Emitted(36, 43) Source(49, 22) + SourceIndex(0) +4 >Emitted(36, 45) Source(49, 24) + SourceIndex(0) +5 >Emitted(36, 62) Source(49, 37) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of robots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(37, 5) Source(50, 5) + SourceIndex(0) +2 >Emitted(37, 12) Source(50, 12) + SourceIndex(0) +3 >Emitted(37, 13) Source(50, 13) + SourceIndex(0) +4 >Emitted(37, 16) Source(50, 16) + SourceIndex(0) +5 >Emitted(37, 17) Source(50, 17) + SourceIndex(0) +6 >Emitted(37, 22) Source(50, 22) + SourceIndex(0) +7 >Emitted(37, 23) Source(50, 23) + SourceIndex(0) +8 >Emitted(37, 24) Source(50, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(38, 2) Source(51, 2) + SourceIndex(0) +--- +>>>for (var _q = 0, _r = getRobots(); _q < _r.length; _q++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^-> +1-> + > +2 >for +3 > +4 > (let {name: nameA, skill: skillA } of +5 > getRobots() +6 > +7 > +8 > getRobots +9 > () +10> +11> let {name: nameA, skill: skillA } +12> +13> let {name: nameA, skill: skillA } of getRobots() +14> ) +1->Emitted(39, 1) Source(52, 1) + SourceIndex(0) +2 >Emitted(39, 4) Source(52, 4) + SourceIndex(0) +3 >Emitted(39, 5) Source(52, 5) + SourceIndex(0) +4 >Emitted(39, 6) Source(52, 43) + SourceIndex(0) +5 >Emitted(39, 16) Source(52, 54) + SourceIndex(0) +6 >Emitted(39, 18) Source(52, 43) + SourceIndex(0) +7 >Emitted(39, 23) Source(52, 43) + SourceIndex(0) +8 >Emitted(39, 32) Source(52, 52) + SourceIndex(0) +9 >Emitted(39, 34) Source(52, 54) + SourceIndex(0) +10>Emitted(39, 36) Source(52, 6) + SourceIndex(0) +11>Emitted(39, 50) Source(52, 39) + SourceIndex(0) +12>Emitted(39, 52) Source(52, 6) + SourceIndex(0) +13>Emitted(39, 56) Source(52, 54) + SourceIndex(0) +14>Emitted(39, 57) Source(52, 55) + SourceIndex(0) +--- +>>> var _s = _r[_q], nameA = _s.name, skillA = _s.skill; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^ +1-> +2 > let { +3 > name: nameA +4 > , +5 > skill: skillA +1->Emitted(40, 5) Source(52, 6) + SourceIndex(0) +2 >Emitted(40, 22) Source(52, 11) + SourceIndex(0) +3 >Emitted(40, 37) Source(52, 22) + SourceIndex(0) +4 >Emitted(40, 39) Source(52, 24) + SourceIndex(0) +5 >Emitted(40, 56) Source(52, 37) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of getRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(41, 5) Source(53, 5) + SourceIndex(0) +2 >Emitted(41, 12) Source(53, 12) + SourceIndex(0) +3 >Emitted(41, 13) Source(53, 13) + SourceIndex(0) +4 >Emitted(41, 16) Source(53, 16) + SourceIndex(0) +5 >Emitted(41, 17) Source(53, 17) + SourceIndex(0) +6 >Emitted(41, 22) Source(53, 22) + SourceIndex(0) +7 >Emitted(41, 23) Source(53, 23) + SourceIndex(0) +8 >Emitted(41, 24) Source(53, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(42, 2) Source(54, 2) + SourceIndex(0) +--- +>>>for (var _t = 0, _u = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; _t < _u.length; _t++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^ +14> ^^ +15> ^^^^^^^^ +16> ^^ +17> ^^ +18> ^^ +19> ^^^^ +20> ^^ +21> ^^^^^^^^^ +22> ^^ +23> ^^^^^ +24> ^^ +25> ^^^^^^^^^^ +26> ^^ +27> ^ +28> ^^ +29> ^^^^^^^^^^^^^^ +30> ^^ +31> ^^^^ +32> ^ +1-> + > +2 >for +3 > +4 > (let {name: nameA, skill: skillA } of +5 > [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skill +14> : +15> "mowing" +16> } +17> , +18> { +19> name +20> : +21> "trimmer" +22> , +23> skill +24> : +25> "trimming" +26> } +27> ] +28> +29> let {name: nameA, skill: skillA } +30> +31> let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] +32> ) +1->Emitted(43, 1) Source(55, 1) + SourceIndex(0) +2 >Emitted(43, 4) Source(55, 4) + SourceIndex(0) +3 >Emitted(43, 5) Source(55, 5) + SourceIndex(0) +4 >Emitted(43, 6) Source(55, 43) + SourceIndex(0) +5 >Emitted(43, 16) Source(55, 119) + SourceIndex(0) +6 >Emitted(43, 18) Source(55, 43) + SourceIndex(0) +7 >Emitted(43, 24) Source(55, 44) + SourceIndex(0) +8 >Emitted(43, 26) Source(55, 46) + SourceIndex(0) +9 >Emitted(43, 30) Source(55, 50) + SourceIndex(0) +10>Emitted(43, 32) Source(55, 52) + SourceIndex(0) +11>Emitted(43, 39) Source(55, 59) + SourceIndex(0) +12>Emitted(43, 41) Source(55, 61) + SourceIndex(0) +13>Emitted(43, 46) Source(55, 66) + SourceIndex(0) +14>Emitted(43, 48) Source(55, 68) + SourceIndex(0) +15>Emitted(43, 56) Source(55, 76) + SourceIndex(0) +16>Emitted(43, 58) Source(55, 78) + SourceIndex(0) +17>Emitted(43, 60) Source(55, 80) + SourceIndex(0) +18>Emitted(43, 62) Source(55, 82) + SourceIndex(0) +19>Emitted(43, 66) Source(55, 86) + SourceIndex(0) +20>Emitted(43, 68) Source(55, 88) + SourceIndex(0) +21>Emitted(43, 77) Source(55, 97) + SourceIndex(0) +22>Emitted(43, 79) Source(55, 99) + SourceIndex(0) +23>Emitted(43, 84) Source(55, 104) + SourceIndex(0) +24>Emitted(43, 86) Source(55, 106) + SourceIndex(0) +25>Emitted(43, 96) Source(55, 116) + SourceIndex(0) +26>Emitted(43, 98) Source(55, 118) + SourceIndex(0) +27>Emitted(43, 99) Source(55, 119) + SourceIndex(0) +28>Emitted(43, 101) Source(55, 6) + SourceIndex(0) +29>Emitted(43, 115) Source(55, 39) + SourceIndex(0) +30>Emitted(43, 117) Source(55, 6) + SourceIndex(0) +31>Emitted(43, 121) Source(55, 119) + SourceIndex(0) +32>Emitted(43, 122) Source(55, 120) + SourceIndex(0) +--- +>>> var _v = _u[_t], nameA = _v.name, skillA = _v.skill; +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^^ +1 > +2 > let { +3 > name: nameA +4 > , +5 > skill: skillA +1 >Emitted(44, 5) Source(55, 6) + SourceIndex(0) +2 >Emitted(44, 22) Source(55, 11) + SourceIndex(0) +3 >Emitted(44, 37) Source(55, 22) + SourceIndex(0) +4 >Emitted(44, 39) Source(55, 24) + SourceIndex(0) +5 >Emitted(44, 56) Source(55, 37) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(45, 5) Source(56, 5) + SourceIndex(0) +2 >Emitted(45, 12) Source(56, 12) + SourceIndex(0) +3 >Emitted(45, 13) Source(56, 13) + SourceIndex(0) +4 >Emitted(45, 16) Source(56, 16) + SourceIndex(0) +5 >Emitted(45, 17) Source(56, 17) + SourceIndex(0) +6 >Emitted(45, 22) Source(56, 22) + SourceIndex(0) +7 >Emitted(45, 23) Source(56, 23) + SourceIndex(0) +8 >Emitted(45, 24) Source(56, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(46, 2) Source(57, 2) + SourceIndex(0) +--- +>>>for (var _w = 0, multiRobots_2 = multiRobots; _w < multiRobots_2.length; _w++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^^^^ +12> ^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of +5 > multiRobots +6 > +7 > multiRobots +8 > +9 > let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +10> +11> let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots +12> ) +1->Emitted(47, 1) Source(58, 1) + SourceIndex(0) +2 >Emitted(47, 4) Source(58, 4) + SourceIndex(0) +3 >Emitted(47, 5) Source(58, 5) + SourceIndex(0) +4 >Emitted(47, 6) Source(58, 82) + SourceIndex(0) +5 >Emitted(47, 16) Source(58, 93) + SourceIndex(0) +6 >Emitted(47, 18) Source(58, 82) + SourceIndex(0) +7 >Emitted(47, 45) Source(58, 93) + SourceIndex(0) +8 >Emitted(47, 47) Source(58, 6) + SourceIndex(0) +9 >Emitted(47, 72) Source(58, 78) + SourceIndex(0) +10>Emitted(47, 74) Source(58, 6) + SourceIndex(0) +11>Emitted(47, 78) Source(58, 93) + SourceIndex(0) +12>Emitted(47, 79) Source(58, 94) + SourceIndex(0) +--- +>>> var _x = multiRobots_2[_w], nameA = _x.name, _y = _x.skills, primaryA = _y.primary, secondaryA = _y.secondary; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let { +3 > name: nameA +4 > , +5 > skills +6 > : { +7 > primary: primaryA +8 > , +9 > secondary: secondaryA +1->Emitted(48, 5) Source(58, 6) + SourceIndex(0) +2 >Emitted(48, 33) Source(58, 11) + SourceIndex(0) +3 >Emitted(48, 48) Source(58, 22) + SourceIndex(0) +4 >Emitted(48, 50) Source(58, 24) + SourceIndex(0) +5 >Emitted(48, 64) Source(58, 30) + SourceIndex(0) +6 >Emitted(48, 66) Source(58, 34) + SourceIndex(0) +7 >Emitted(48, 87) Source(58, 51) + SourceIndex(0) +8 >Emitted(48, 89) Source(58, 53) + SourceIndex(0) +9 >Emitted(48, 114) Source(58, 74) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } } of multiRobots) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(49, 5) Source(59, 5) + SourceIndex(0) +2 >Emitted(49, 12) Source(59, 12) + SourceIndex(0) +3 >Emitted(49, 13) Source(59, 13) + SourceIndex(0) +4 >Emitted(49, 16) Source(59, 16) + SourceIndex(0) +5 >Emitted(49, 17) Source(59, 17) + SourceIndex(0) +6 >Emitted(49, 22) Source(59, 22) + SourceIndex(0) +7 >Emitted(49, 23) Source(59, 23) + SourceIndex(0) +8 >Emitted(49, 24) Source(59, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(50, 2) Source(60, 2) + SourceIndex(0) +--- +>>>for (var _z = 0, _0 = getMultiRobots(); _z < _0.length; _z++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^^^^^^^^^^^^^ +9 > ^^ +10> ^^ +11> ^^^^^^^^^^^^^^ +12> ^^ +13> ^^^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of +5 > getMultiRobots() +6 > +7 > +8 > getMultiRobots +9 > () +10> +11> let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +12> +13> let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots() +14> ) +1->Emitted(51, 1) Source(61, 1) + SourceIndex(0) +2 >Emitted(51, 4) Source(61, 4) + SourceIndex(0) +3 >Emitted(51, 5) Source(61, 5) + SourceIndex(0) +4 >Emitted(51, 6) Source(61, 82) + SourceIndex(0) +5 >Emitted(51, 16) Source(61, 98) + SourceIndex(0) +6 >Emitted(51, 18) Source(61, 82) + SourceIndex(0) +7 >Emitted(51, 23) Source(61, 82) + SourceIndex(0) +8 >Emitted(51, 37) Source(61, 96) + SourceIndex(0) +9 >Emitted(51, 39) Source(61, 98) + SourceIndex(0) +10>Emitted(51, 41) Source(61, 6) + SourceIndex(0) +11>Emitted(51, 55) Source(61, 78) + SourceIndex(0) +12>Emitted(51, 57) Source(61, 6) + SourceIndex(0) +13>Emitted(51, 61) Source(61, 98) + SourceIndex(0) +14>Emitted(51, 62) Source(61, 99) + SourceIndex(0) +--- +>>> var _1 = _0[_z], nameA = _1.name, _2 = _1.skills, primaryA = _2.primary, secondaryA = _2.secondary; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let { +3 > name: nameA +4 > , +5 > skills +6 > : { +7 > primary: primaryA +8 > , +9 > secondary: secondaryA +1->Emitted(52, 5) Source(61, 6) + SourceIndex(0) +2 >Emitted(52, 22) Source(61, 11) + SourceIndex(0) +3 >Emitted(52, 37) Source(61, 22) + SourceIndex(0) +4 >Emitted(52, 39) Source(61, 24) + SourceIndex(0) +5 >Emitted(52, 53) Source(61, 30) + SourceIndex(0) +6 >Emitted(52, 55) Source(61, 34) + SourceIndex(0) +7 >Emitted(52, 76) Source(61, 51) + SourceIndex(0) +8 >Emitted(52, 78) Source(61, 53) + SourceIndex(0) +9 >Emitted(52, 103) Source(61, 74) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } } of getMultiRobots()) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(53, 5) Source(62, 5) + SourceIndex(0) +2 >Emitted(53, 12) Source(62, 12) + SourceIndex(0) +3 >Emitted(53, 13) Source(62, 13) + SourceIndex(0) +4 >Emitted(53, 16) Source(62, 16) + SourceIndex(0) +5 >Emitted(53, 17) Source(62, 17) + SourceIndex(0) +6 >Emitted(53, 22) Source(62, 22) + SourceIndex(0) +7 >Emitted(53, 23) Source(62, 23) + SourceIndex(0) +8 >Emitted(53, 24) Source(62, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(54, 2) Source(63, 2) + SourceIndex(0) +--- +>>>for (var _3 = 0, _4 = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^^^ +10> ^^ +11> ^^^^^^^ +12> ^^ +13> ^^^^^^ +14> ^^ +15> ^^ +16> ^^^^^^^ +17> ^^ +18> ^^^^^^^^ +19> ^^ +20> ^^^^^^^^^ +21> ^^ +22> ^^^^^^ +23> ^^ +24> ^^ +25> ^^^^^^^^^^^^^^-> +1-> + > +2 >for +3 > +4 > (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of +5 > [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +6 > +7 > [ +8 > { +9 > name +10> : +11> "mower" +12> , +13> skills +14> : +15> { +16> primary +17> : +18> "mowing" +19> , +20> secondary +21> : +22> "none" +23> } +24> } +1->Emitted(55, 1) Source(64, 1) + SourceIndex(0) +2 >Emitted(55, 4) Source(64, 4) + SourceIndex(0) +3 >Emitted(55, 5) Source(64, 5) + SourceIndex(0) +4 >Emitted(55, 6) Source(64, 82) + SourceIndex(0) +5 >Emitted(55, 16) Source(65, 79) + SourceIndex(0) +6 >Emitted(55, 18) Source(64, 82) + SourceIndex(0) +7 >Emitted(55, 24) Source(64, 83) + SourceIndex(0) +8 >Emitted(55, 26) Source(64, 85) + SourceIndex(0) +9 >Emitted(55, 30) Source(64, 89) + SourceIndex(0) +10>Emitted(55, 32) Source(64, 91) + SourceIndex(0) +11>Emitted(55, 39) Source(64, 98) + SourceIndex(0) +12>Emitted(55, 41) Source(64, 100) + SourceIndex(0) +13>Emitted(55, 47) Source(64, 106) + SourceIndex(0) +14>Emitted(55, 49) Source(64, 108) + SourceIndex(0) +15>Emitted(55, 51) Source(64, 110) + SourceIndex(0) +16>Emitted(55, 58) Source(64, 117) + SourceIndex(0) +17>Emitted(55, 60) Source(64, 119) + SourceIndex(0) +18>Emitted(55, 68) Source(64, 127) + SourceIndex(0) +19>Emitted(55, 70) Source(64, 129) + SourceIndex(0) +20>Emitted(55, 79) Source(64, 138) + SourceIndex(0) +21>Emitted(55, 81) Source(64, 140) + SourceIndex(0) +22>Emitted(55, 87) Source(64, 146) + SourceIndex(0) +23>Emitted(55, 89) Source(64, 148) + SourceIndex(0) +24>Emitted(55, 91) Source(64, 150) + SourceIndex(0) +--- +>>> { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; _3 < _4.length; _3++) { +1->^^^^ +2 > ^^ +3 > ^^^^ +4 > ^^ +5 > ^^^^^^^^^ +6 > ^^ +7 > ^^^^^^ +8 > ^^ +9 > ^^ +10> ^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^ +15> ^^ +16> ^^^^^^^^ +17> ^^ +18> ^^ +19> ^ +20> ^^ +21> ^^^^^^^^^^^^^^ +22> ^^ +23> ^^^^ +24> ^ +25> ^^^-> +1->, + > +2 > { +3 > name +4 > : +5 > "trimmer" +6 > , +7 > skills +8 > : +9 > { +10> primary +11> : +12> "trimming" +13> , +14> secondary +15> : +16> "edging" +17> } +18> } +19> ] +20> +21> let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } +22> +23> let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] +24> ) +1->Emitted(56, 5) Source(65, 5) + SourceIndex(0) +2 >Emitted(56, 7) Source(65, 7) + SourceIndex(0) +3 >Emitted(56, 11) Source(65, 11) + SourceIndex(0) +4 >Emitted(56, 13) Source(65, 13) + SourceIndex(0) +5 >Emitted(56, 22) Source(65, 22) + SourceIndex(0) +6 >Emitted(56, 24) Source(65, 24) + SourceIndex(0) +7 >Emitted(56, 30) Source(65, 30) + SourceIndex(0) +8 >Emitted(56, 32) Source(65, 32) + SourceIndex(0) +9 >Emitted(56, 34) Source(65, 34) + SourceIndex(0) +10>Emitted(56, 41) Source(65, 41) + SourceIndex(0) +11>Emitted(56, 43) Source(65, 43) + SourceIndex(0) +12>Emitted(56, 53) Source(65, 53) + SourceIndex(0) +13>Emitted(56, 55) Source(65, 55) + SourceIndex(0) +14>Emitted(56, 64) Source(65, 64) + SourceIndex(0) +15>Emitted(56, 66) Source(65, 66) + SourceIndex(0) +16>Emitted(56, 74) Source(65, 74) + SourceIndex(0) +17>Emitted(56, 76) Source(65, 76) + SourceIndex(0) +18>Emitted(56, 78) Source(65, 78) + SourceIndex(0) +19>Emitted(56, 79) Source(65, 79) + SourceIndex(0) +20>Emitted(56, 81) Source(64, 6) + SourceIndex(0) +21>Emitted(56, 95) Source(64, 78) + SourceIndex(0) +22>Emitted(56, 97) Source(64, 6) + SourceIndex(0) +23>Emitted(56, 101) Source(65, 79) + SourceIndex(0) +24>Emitted(56, 102) Source(65, 80) + SourceIndex(0) +--- +>>> var _5 = _4[_3], nameA = _5.name, _6 = _5.skills, primaryA = _6.primary, secondaryA = _6.secondary; +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^^^^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> +2 > let { +3 > name: nameA +4 > , +5 > skills +6 > : { +7 > primary: primaryA +8 > , +9 > secondary: secondaryA +1->Emitted(57, 5) Source(64, 6) + SourceIndex(0) +2 >Emitted(57, 22) Source(64, 11) + SourceIndex(0) +3 >Emitted(57, 37) Source(64, 22) + SourceIndex(0) +4 >Emitted(57, 39) Source(64, 24) + SourceIndex(0) +5 >Emitted(57, 53) Source(64, 30) + SourceIndex(0) +6 >Emitted(57, 55) Source(64, 34) + SourceIndex(0) +7 >Emitted(57, 76) Source(64, 51) + SourceIndex(0) +8 >Emitted(57, 78) Source(64, 53) + SourceIndex(0) +9 >Emitted(57, 103) Source(64, 74) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(58, 5) Source(66, 5) + SourceIndex(0) +2 >Emitted(58, 12) Source(66, 12) + SourceIndex(0) +3 >Emitted(58, 13) Source(66, 13) + SourceIndex(0) +4 >Emitted(58, 16) Source(66, 16) + SourceIndex(0) +5 >Emitted(58, 17) Source(66, 17) + SourceIndex(0) +6 >Emitted(58, 22) Source(66, 22) + SourceIndex(0) +7 >Emitted(58, 23) Source(66, 23) + SourceIndex(0) +8 >Emitted(58, 24) Source(66, 24) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(59, 2) Source(67, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringForOfObjectBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.symbols new file mode 100644 index 0000000000..8fef1fabd6 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.symbols @@ -0,0 +1,259 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 1, 8)) +} +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 2, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 3, 17)) + + skill: string; +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 4, 17)) +} + +interface MultiRobot { +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 6, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 8, 22)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 9, 17)) + + primary: string; +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 10, 13)) + + secondary: string; +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 11, 24)) + + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 16, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 16, 24)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 16, 39)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 16, 60)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 16, 77)) + +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 17, 3)) +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 17, 34)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 17, 49)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 17, 59)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 17, 78)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 18, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 18, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 18, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 18, 53)) + +function getRobots() { +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 18, 79)) + + return robots; +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 16, 3)) +} + +function getMultiRobots() { +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 22, 1)) + + return multiRobots; +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 17, 3)) +} + +for (let {name: nameA } of robots) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 28, 10)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 16, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 28, 10)) +} +for (let {name: nameA } of getRobots()) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 31, 10)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 18, 79)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 31, 10)) +} +for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 29)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 10)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 29)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 44)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 65)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 82)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 34, 10)) +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 37, 20)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 37, 39)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 17, 3)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 37, 20)) +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 40, 20)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 40, 39)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 22, 1)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 40, 20)) +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 86)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 96)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 20)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 115)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 39)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 71)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 86)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 96)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 115)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 44, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 44, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 44, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 44, 53)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 43, 20)) +} + +for (let {name: nameA, skill: skillA } of robots) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 48, 10)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 4, 17)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 48, 22)) +>robots : Symbol(robots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 16, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 48, 10)) +} +for (let {name: nameA, skill: skillA } of getRobots()) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 51, 10)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 4, 17)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 51, 22)) +>getRobots : Symbol(getRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 18, 79)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 51, 10)) +} +for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 44)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 10)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 59)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 22)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 44)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 59)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 80)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 97)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 54, 10)) +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +>name : Symbol(MultiRobot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 8, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 57, 10)) +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 57, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 57, 51)) +>multiRobots : Symbol(multiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 17, 3)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 57, 10)) +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { +>name : Symbol(MultiRobot.name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 8, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 60, 10)) +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 60, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 60, 51)) +>getMultiRobots : Symbol(getMultiRobots, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 22, 1)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 60, 10)) +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 83)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 10)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 98)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 108)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 127)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 51)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 83)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 98)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 108)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 127)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>name : Symbol(name, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 64, 5)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 64, 22)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 64, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 64, 53)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForOfObjectBindingPattern.ts, 63, 10)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.types new file mode 100644 index 0000000000..17c060225d --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForOfObjectBindingPattern.types @@ -0,0 +1,329 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +interface Robot { +>Robot : Robot + + name: string; +>name : string + + skill: string; +>skill : string +} + +interface MultiRobot { +>MultiRobot : MultiRobot + + name: string; +>name : string + + skills: { +>skills : { primary: string; secondary: string; } + + primary: string; +>primary : string + + secondary: string; +>secondary : string + + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +>robots : Robot[] +>Robot : Robot +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>multiRobots : MultiRobot[] +>MultiRobot : MultiRobot +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + +function getRobots() { +>getRobots : () => Robot[] + + return robots; +>robots : Robot[] +} + +function getMultiRobots() { +>getMultiRobots : () => MultiRobot[] + + return multiRobots; +>multiRobots : MultiRobot[] +} + +for (let {name: nameA } of robots) { +>name : any +>nameA : string +>robots : Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA } of getRobots()) { +>name : any +>nameA : string +>getRobots() : Robot[] +>getRobots : () => Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : any +>nameA : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>multiRobots : MultiRobot[] + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>getMultiRobots() : MultiRobot[] +>getMultiRobots : () => MultiRobot[] + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} + +for (let {name: nameA, skill: skillA } of robots) { +>name : any +>nameA : string +>skill : any +>skillA : string +>robots : Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA, skill: skillA } of getRobots()) { +>name : any +>nameA : string +>skill : any +>skillA : string +>getRobots() : Robot[] +>getRobots : () => Robot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { +>name : any +>nameA : string +>skill : any +>skillA : string +>[{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }] : { name: string; skill: string; }[] +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { +>name : any +>nameA : string +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>multiRobots : MultiRobot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { +>name : any +>nameA : string +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>getMultiRobots() : MultiRobot[] +>getMultiRobots : () => MultiRobot[] + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, +>name : any +>nameA : string +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>[{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }] : { name: string; skills: { primary: string; secondary: string; }; }[] +>{ name: "mower", skills: { primary: "mowing", secondary: "none" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"mower" : string +>skills : { primary: string; secondary: string; } +>{ primary: "mowing", secondary: "none" } : { primary: string; secondary: string; } +>primary : string +>"mowing" : string +>secondary : string +>"none" : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : { name: string; skills: { primary: string; secondary: string; }; } +>name : string +>"trimmer" : string +>skills : { primary: string; secondary: string; } +>{ primary: "trimming", secondary: "edging" } : { primary: string; secondary: string; } +>primary : string +>"trimming" : string +>secondary : string +>"edging" : string + + console.log(nameA); +>console.log(nameA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>nameA : string +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern.ts b/tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern.ts new file mode 100644 index 0000000000..df822f89bc --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern.ts @@ -0,0 +1,68 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} + +let robots: Robot[] = [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]; +let multiRobots: MultiRobot[] = [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]; + +function getRobots() { + return robots; +} + +function getMultiRobots() { + return multiRobots; +} + +for (let {name: nameA } of robots) { + console.log(nameA); +} +for (let {name: nameA } of getRobots()) { + console.log(nameA); +} +for (let {name: nameA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(primaryA); +} + +for (let {name: nameA, skill: skillA } of robots) { + console.log(nameA); +} +for (let {name: nameA, skill: skillA } of getRobots()) { + console.log(nameA); +} +for (let {name: nameA, skill: skillA } of [{ name: "mower", skill: "mowing" }, { name: "trimmer", skill: "trimming" }]) { + console.log(nameA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of multiRobots) { + console.log(nameA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of getMultiRobots()) { + console.log(nameA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } of [{ name: "mower", skills: { primary: "mowing", secondary: "none" } }, + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }]) { + console.log(nameA); +} \ No newline at end of file