diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js new file mode 100644 index 00000000000..deb2680000f --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js @@ -0,0 +1,97 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts] +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, string[]]; + +var robotA: Robot = [1, "mower", "mowing"]; +var robotB: Robot = [2, "trimmer", "trimming"]; +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + +let nameA: string, numberB: number, nameB: string, skillB: string; +let robotAInfo: (number | string)[]; + +let multiSkillB: string[], nameMB: string, primarySkillB: string, secondarySkillB: string; +let multiRobotAInfo: (string | string[])[]; + +[, nameA = "helloNoName"] = robotA; +[, nameB = "helloNoName"] = getRobotB(); +[, nameB = "helloNoName"] = [2, "trimmer", "trimming"]; +[, multiSkillB = []] = multiRobotB; +[, multiSkillB = []] = getMultiRobotB(); +[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]]; + +[numberB = -1] = robotB; +[numberB = -1] = getRobotB(); +[numberB = -1] = [2, "trimmer", "trimming"]; +[nameMB = "helloNoName"] = multiRobotB; +[nameMB = "helloNoName"] = getMultiRobotB(); +[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]]; + +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB; +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB(); +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"]; +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB; +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB(); +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = + ["trimmer", ["trimming", "edging"]]; + +[numberB = -1, ...robotAInfo] = robotB; +[numberB = -1, ...robotAInfo] = getRobotB(); +[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"]; + +if (nameA == nameB) { + console.log(skillB); +} + +function getRobotB() { + return robotB; +} + +function getMultiRobotB() { + return multiRobotB; +} + +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js] +var robotA = [1, "mower", "mowing"]; +var robotB = [2, "trimmer", "trimming"]; +var multiRobotA = ["mower", ["mowing", ""]]; +var multiRobotB = ["trimmer", ["trimming", "edging"]]; +var nameA, numberB, nameB, skillB; +var robotAInfo; +var multiSkillB, nameMB, primarySkillB, secondarySkillB; +var multiRobotAInfo; +_a = robotA[1], nameA = _a === void 0 ? "helloNoName" : _a; +_b = getRobotB(), _c = _b[1], nameB = _c === void 0 ? "helloNoName" : _c; +_d = [2, "trimmer", "trimming"], _e = _d[1], nameB = _e === void 0 ? "helloNoName" : _e; +_f = multiRobotB[1], multiSkillB = _f === void 0 ? [] : _f; +_g = getMultiRobotB(), _h = _g[1], multiSkillB = _h === void 0 ? [] : _h; +_j = ["roomba", ["vaccum", "mopping"]], _k = _j[1], multiSkillB = _k === void 0 ? [] : _k; +_l = robotB[0], numberB = _l === void 0 ? -1 : _l; +_m = getRobotB()[0], numberB = _m === void 0 ? -1 : _m; +_o = [2, "trimmer", "trimming"][0], numberB = _o === void 0 ? -1 : _o; +_p = multiRobotB[0], nameMB = _p === void 0 ? "helloNoName" : _p; +_q = getMultiRobotB()[0], nameMB = _q === void 0 ? "helloNoName" : _q; +_r = ["trimmer", ["trimming", "edging"]][0], nameMB = _r === void 0 ? "helloNoName" : _r; +_s = robotB[0], numberB = _s === void 0 ? -1 : _s, _t = robotB[1], nameB = _t === void 0 ? "helloNoName" : _t, _u = robotB[2], skillB = _u === void 0 ? "noSkill" : _u; +_v = getRobotB(), _w = _v[0], numberB = _w === void 0 ? -1 : _w, _x = _v[1], nameB = _x === void 0 ? "helloNoName" : _x, _y = _v[2], skillB = _y === void 0 ? "noSkill" : _y; +_z = [2, "trimmer", "trimming"], _0 = _z[0], numberB = _0 === void 0 ? -1 : _0, _1 = _z[1], nameB = _1 === void 0 ? "helloNoName" : _1, _2 = _z[2], skillB = _2 === void 0 ? "noSkill" : _2; +_3 = multiRobotB[0], nameMB = _3 === void 0 ? "helloNoName" : _3, _4 = multiRobotB[1], _5 = _4 === void 0 ? [] : _4, _6 = _5[0], primarySkillB = _6 === void 0 ? "noSkill" : _6, _7 = _5[1], secondarySkillB = _7 === void 0 ? "noSkill" : _7; +_8 = getMultiRobotB(), _9 = _8[0], nameMB = _9 === void 0 ? "helloNoName" : _9, _10 = _8[1], _11 = _10 === void 0 ? [] : _10, _12 = _11[0], primarySkillB = _12 === void 0 ? "noSkill" : _12, _13 = _11[1], secondarySkillB = _13 === void 0 ? "noSkill" : _13; +_14 = ["trimmer", ["trimming", "edging"]], _15 = _14[0], nameMB = _15 === void 0 ? "helloNoName" : _15, _16 = _14[1], _17 = _16 === void 0 ? [] : _16, _18 = _17[0], primarySkillB = _18 === void 0 ? "noSkill" : _18, _19 = _17[1], secondarySkillB = _19 === void 0 ? "noSkill" : _19; +_20 = robotB[0], numberB = _20 === void 0 ? -1 : _20, robotAInfo = robotB.slice(1); +_21 = getRobotB(), _22 = _21[0], numberB = _22 === void 0 ? -1 : _22, robotAInfo = _21.slice(1); +_23 = [2, "trimmer", "trimming"], _24 = _23[0], numberB = _24 === void 0 ? -1 : _24, robotAInfo = _23.slice(1); +if (nameA == nameB) { + console.log(skillB); +} +function getRobotB() { + return robotB; +} +function getMultiRobotB() { + return multiRobotB; +} +var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24; +//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js.map new file mode 100644 index 00000000000..1b7453826e4 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js.map] +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts"],"names":[],"mappings":"AAMA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,IAAI,WAAW,GAAsB,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/D,IAAI,WAAW,GAAsB,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEzE,IAAI,KAAa,EAAE,OAAe,EAAE,KAAa,EAAE,MAAc,CAAC;AAClE,IAAI,UAA+B,CAAC;AAEpC,IAAI,WAAqB,EAAE,MAAc,EAAE,aAAqB,EAAE,eAAuB,CAAC;AAC1F,IAAI,eAAsC,CAAC;AAExC,cAAqB,EAArB,0CAAqB,CAAW;AACnC,gBAAuC,EAApC,UAAqB,EAArB,0CAAqB,CAAgB;AACxC,+BAAsD,EAAnD,UAAqB,EAArB,0CAAqB,CAA+B;AACpD,mBAAgB,EAAhB,qCAAgB,CAAgB;AACnC,qBAAuC,EAApC,UAAgB,EAAhB,qCAAgB,CAAqB;AACxC,sCAAwD,EAArD,UAAgB,EAAhB,qCAAgB,CAAsC;AAExD,cAAY,EAAZ,iCAAY,CAAW;AACvB,mBAAY,EAAZ,iCAAY,CAAgB;AAC5B,kCAAY,EAAZ,iCAAY,CAA+B;AAC3C,mBAAsB,EAAtB,2CAAsB,CAAgB;AACtC,wBAAsB,EAAtB,2CAAsB,CAAqB;AAC3C,2CAAsB,EAAtB,2CAAsB,CAAwC;AAE9D,cAAY,EAAZ,iCAAY,EAAE,cAAqB,EAArB,0CAAqB,EAAE,cAAkB,EAAlB,uCAAkB,CAAW;AACnE,gBAAuE,EAAtE,UAAY,EAAZ,iCAAY,EAAE,UAAqB,EAArB,0CAAqB,EAAE,UAAkB,EAAlB,uCAAkB,CAAgB;AACxE,+BAAsF,EAArF,UAAY,EAAZ,iCAAY,EAAE,UAAqB,EAArB,0CAAqB,EAAE,UAAkB,EAAlB,uCAAkB,CAA+B;AACtF,mBAAsB,EAAtB,2CAAsB,EAAE,mBAA6D,EAA7D,4BAA6D,EAA5D,UAAyB,EAAzB,8CAAyB,EAAE,UAA2B,EAA3B,gDAA2B,CAAsB;AACtG,qBAA0G,EAAzG,UAAsB,EAAtB,2CAAsB,EAAE,WAA6D,EAA7D,+BAA6D,EAA5D,YAAyB,EAAzB,gDAAyB,EAAE,YAA2B,EAA3B,kDAA2B,CAA2B;AAC3G,yCACuC,EADtC,YAAsB,EAAtB,6CAAsB,EAAE,YAA6D,EAA7D,+BAA6D,EAA5D,YAAyB,EAAzB,gDAAyB,EAAE,YAA2B,EAA3B,kDAA2B,CACxC;AAEvC,eAAY,EAAZ,mCAAY,EAAE,4BAAa,CAAW;AACvC,iBAA2C,EAA1C,YAAY,EAAZ,mCAAY,EAAE,yBAAa,CAAgB;AAC5C,gCAAiE,EAAhE,YAAY,EAAZ,mCAAY,EAAE,yBAAa,CAAsC;AAElE,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED;IACI,MAAM,CAAC,MAAM,CAAC;AAClB,CAAC;AAED;IACI,MAAM,CAAC,WAAW,CAAC;AACvB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.sourcemap.txt new file mode 100644 index 00000000000..c9784dc30a3 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.sourcemap.txt @@ -0,0 +1,1090 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js +mapUrl: sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js.map +sourceRoot: +sources: sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js +sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts +------------------------------------------------------------------- +>>>var robotA = [1, "mower", "mowing"]; +1 > +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^^^^ +11> ^ +12> ^ +13> ^^^^^-> +1 >declare var console: { + > log(msg: any): void; + >} + >type Robot = [number, string, string]; + >type MultiSkilledRobot = [string, string[]]; + > + > +2 >var +3 > robotA +4 > : Robot = +5 > [ +6 > 1 +7 > , +8 > "mower" +9 > , +10> "mowing" +11> ] +12> ; +1 >Emitted(1, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(7, 5) + SourceIndex(0) +3 >Emitted(1, 11) Source(7, 11) + SourceIndex(0) +4 >Emitted(1, 14) Source(7, 21) + SourceIndex(0) +5 >Emitted(1, 15) Source(7, 22) + SourceIndex(0) +6 >Emitted(1, 16) Source(7, 23) + SourceIndex(0) +7 >Emitted(1, 18) Source(7, 25) + SourceIndex(0) +8 >Emitted(1, 25) Source(7, 32) + SourceIndex(0) +9 >Emitted(1, 27) Source(7, 34) + SourceIndex(0) +10>Emitted(1, 35) Source(7, 42) + SourceIndex(0) +11>Emitted(1, 36) Source(7, 43) + SourceIndex(0) +12>Emitted(1, 37) Source(7, 44) + SourceIndex(0) +--- +>>>var robotB = [2, "trimmer", "trimming"]; +1-> +2 >^^^^ +3 > ^^^^^^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^ +12> ^ +13> ^^^^^-> +1-> + > +2 >var +3 > robotB +4 > : Robot = +5 > [ +6 > 2 +7 > , +8 > "trimmer" +9 > , +10> "trimming" +11> ] +12> ; +1->Emitted(2, 1) Source(8, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(8, 5) + SourceIndex(0) +3 >Emitted(2, 11) Source(8, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(8, 21) + SourceIndex(0) +5 >Emitted(2, 15) Source(8, 22) + SourceIndex(0) +6 >Emitted(2, 16) Source(8, 23) + SourceIndex(0) +7 >Emitted(2, 18) Source(8, 25) + SourceIndex(0) +8 >Emitted(2, 27) Source(8, 34) + SourceIndex(0) +9 >Emitted(2, 29) Source(8, 36) + SourceIndex(0) +10>Emitted(2, 39) Source(8, 46) + SourceIndex(0) +11>Emitted(2, 40) Source(8, 47) + SourceIndex(0) +12>Emitted(2, 41) Source(8, 48) + SourceIndex(0) +--- +>>>var multiRobotA = ["mower", ["mowing", ""]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^ +10> ^^ +11> ^^ +12> ^ +13> ^ +14> ^ +15> ^^^^^^^^^^^-> +1-> + > +2 >var +3 > multiRobotA +4 > : MultiSkilledRobot = +5 > [ +6 > "mower" +7 > , +8 > [ +9 > "mowing" +10> , +11> "" +12> ] +13> ] +14> ; +1->Emitted(3, 1) Source(9, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(9, 5) + SourceIndex(0) +3 >Emitted(3, 16) Source(9, 16) + SourceIndex(0) +4 >Emitted(3, 19) Source(9, 38) + SourceIndex(0) +5 >Emitted(3, 20) Source(9, 39) + SourceIndex(0) +6 >Emitted(3, 27) Source(9, 46) + SourceIndex(0) +7 >Emitted(3, 29) Source(9, 48) + SourceIndex(0) +8 >Emitted(3, 30) Source(9, 49) + SourceIndex(0) +9 >Emitted(3, 38) Source(9, 57) + SourceIndex(0) +10>Emitted(3, 40) Source(9, 59) + SourceIndex(0) +11>Emitted(3, 42) Source(9, 61) + SourceIndex(0) +12>Emitted(3, 43) Source(9, 62) + SourceIndex(0) +13>Emitted(3, 44) Source(9, 63) + SourceIndex(0) +14>Emitted(3, 45) Source(9, 64) + SourceIndex(0) +--- +>>>var multiRobotB = ["trimmer", ["trimming", "edging"]]; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^^ +8 > ^ +9 > ^^^^^^^^^^ +10> ^^ +11> ^^^^^^^^ +12> ^ +13> ^ +14> ^ +1-> + > +2 >var +3 > multiRobotB +4 > : MultiSkilledRobot = +5 > [ +6 > "trimmer" +7 > , +8 > [ +9 > "trimming" +10> , +11> "edging" +12> ] +13> ] +14> ; +1->Emitted(4, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(4, 5) Source(10, 5) + SourceIndex(0) +3 >Emitted(4, 16) Source(10, 16) + SourceIndex(0) +4 >Emitted(4, 19) Source(10, 38) + SourceIndex(0) +5 >Emitted(4, 20) Source(10, 39) + SourceIndex(0) +6 >Emitted(4, 29) Source(10, 48) + SourceIndex(0) +7 >Emitted(4, 31) Source(10, 50) + SourceIndex(0) +8 >Emitted(4, 32) Source(10, 51) + SourceIndex(0) +9 >Emitted(4, 42) Source(10, 61) + SourceIndex(0) +10>Emitted(4, 44) Source(10, 63) + SourceIndex(0) +11>Emitted(4, 52) Source(10, 71) + SourceIndex(0) +12>Emitted(4, 53) Source(10, 72) + SourceIndex(0) +13>Emitted(4, 54) Source(10, 73) + SourceIndex(0) +14>Emitted(4, 55) Source(10, 74) + SourceIndex(0) +--- +>>>var nameA, numberB, nameB, skillB; +1 > +2 >^^^^ +3 > ^^^^^ +4 > ^^ +5 > ^^^^^^^ +6 > ^^ +7 > ^^^^^ +8 > ^^ +9 > ^^^^^^ +10> ^ +1 > + > + > +2 >let +3 > nameA: string +4 > , +5 > numberB: number +6 > , +7 > nameB: string +8 > , +9 > skillB: string +10> ; +1 >Emitted(5, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(5, 5) Source(12, 5) + SourceIndex(0) +3 >Emitted(5, 10) Source(12, 18) + SourceIndex(0) +4 >Emitted(5, 12) Source(12, 20) + SourceIndex(0) +5 >Emitted(5, 19) Source(12, 35) + SourceIndex(0) +6 >Emitted(5, 21) Source(12, 37) + SourceIndex(0) +7 >Emitted(5, 26) Source(12, 50) + SourceIndex(0) +8 >Emitted(5, 28) Source(12, 52) + SourceIndex(0) +9 >Emitted(5, 34) Source(12, 66) + SourceIndex(0) +10>Emitted(5, 35) Source(12, 67) + SourceIndex(0) +--- +>>>var robotAInfo; +1 > +2 >^^^^ +3 > ^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >let +3 > robotAInfo: (number | string)[] +4 > ; +1 >Emitted(6, 1) Source(13, 1) + SourceIndex(0) +2 >Emitted(6, 5) Source(13, 5) + SourceIndex(0) +3 >Emitted(6, 15) Source(13, 36) + SourceIndex(0) +4 >Emitted(6, 16) Source(13, 37) + SourceIndex(0) +--- +>>>var multiSkillB, nameMB, primarySkillB, secondarySkillB; +1-> +2 >^^^^ +3 > ^^^^^^^^^^^ +4 > ^^ +5 > ^^^^^^ +6 > ^^ +7 > ^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^ +10> ^ +1-> + > + > +2 >let +3 > multiSkillB: string[] +4 > , +5 > nameMB: string +6 > , +7 > primarySkillB: string +8 > , +9 > secondarySkillB: string +10> ; +1->Emitted(7, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(7, 5) Source(15, 5) + SourceIndex(0) +3 >Emitted(7, 16) Source(15, 26) + SourceIndex(0) +4 >Emitted(7, 18) Source(15, 28) + SourceIndex(0) +5 >Emitted(7, 24) Source(15, 42) + SourceIndex(0) +6 >Emitted(7, 26) Source(15, 44) + SourceIndex(0) +7 >Emitted(7, 39) Source(15, 65) + SourceIndex(0) +8 >Emitted(7, 41) Source(15, 67) + SourceIndex(0) +9 >Emitted(7, 56) Source(15, 90) + SourceIndex(0) +10>Emitted(7, 57) Source(15, 91) + SourceIndex(0) +--- +>>>var multiRobotAInfo; +1 > +2 >^^^^ +3 > ^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >let +3 > multiRobotAInfo: (string | string[])[] +4 > ; +1 >Emitted(8, 1) Source(16, 1) + SourceIndex(0) +2 >Emitted(8, 5) Source(16, 5) + SourceIndex(0) +3 >Emitted(8, 20) Source(16, 43) + SourceIndex(0) +4 >Emitted(8, 21) Source(16, 44) + SourceIndex(0) +--- +>>>_a = robotA[1], nameA = _a === void 0 ? "helloNoName" : _a; +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^-> +1-> + > + >[, +2 >nameA = "helloNoName" +3 > +4 > nameA = "helloNoName" +5 > ] = robotA; +1->Emitted(9, 1) Source(18, 4) + SourceIndex(0) +2 >Emitted(9, 15) Source(18, 25) + SourceIndex(0) +3 >Emitted(9, 17) Source(18, 4) + SourceIndex(0) +4 >Emitted(9, 59) Source(18, 25) + SourceIndex(0) +5 >Emitted(9, 60) Source(18, 36) + SourceIndex(0) +--- +>>>_b = getRobotB(), _c = _b[1], nameB = _c === void 0 ? "helloNoName" : _c; +1-> +2 >^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^ +8 > ^^^^^^^^^^^^^^^^-> +1-> + > +2 >[, nameB = "helloNoName"] = getRobotB() +3 > +4 > nameB = "helloNoName" +5 > +6 > nameB = "helloNoName" +7 > ] = getRobotB(); +1->Emitted(10, 1) Source(19, 1) + SourceIndex(0) +2 >Emitted(10, 17) Source(19, 40) + SourceIndex(0) +3 >Emitted(10, 19) Source(19, 4) + SourceIndex(0) +4 >Emitted(10, 29) Source(19, 25) + SourceIndex(0) +5 >Emitted(10, 31) Source(19, 4) + SourceIndex(0) +6 >Emitted(10, 73) Source(19, 25) + SourceIndex(0) +7 >Emitted(10, 74) Source(19, 41) + SourceIndex(0) +--- +>>>_d = [2, "trimmer", "trimming"], _e = _d[1], nameB = _e === void 0 ? "helloNoName" : _e; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^ +1-> + > +2 >[, nameB = "helloNoName"] = [2, "trimmer", "trimming"] +3 > +4 > nameB = "helloNoName" +5 > +6 > nameB = "helloNoName" +7 > ] = [2, "trimmer", "trimming"]; +1->Emitted(11, 1) Source(20, 1) + SourceIndex(0) +2 >Emitted(11, 32) Source(20, 55) + SourceIndex(0) +3 >Emitted(11, 34) Source(20, 4) + SourceIndex(0) +4 >Emitted(11, 44) Source(20, 25) + SourceIndex(0) +5 >Emitted(11, 46) Source(20, 4) + SourceIndex(0) +6 >Emitted(11, 88) Source(20, 25) + SourceIndex(0) +7 >Emitted(11, 89) Source(20, 56) + SourceIndex(0) +--- +>>>_f = multiRobotB[1], multiSkillB = _f === void 0 ? [] : _f; +1 > +2 >^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^-> +1 > + >[, +2 >multiSkillB = [] +3 > +4 > multiSkillB = [] +5 > ] = multiRobotB; +1 >Emitted(12, 1) Source(21, 4) + SourceIndex(0) +2 >Emitted(12, 20) Source(21, 20) + SourceIndex(0) +3 >Emitted(12, 22) Source(21, 4) + SourceIndex(0) +4 >Emitted(12, 59) Source(21, 20) + SourceIndex(0) +5 >Emitted(12, 60) Source(21, 36) + SourceIndex(0) +--- +>>>_g = getMultiRobotB(), _h = _g[1], multiSkillB = _h === void 0 ? [] : _h; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^ +8 > ^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >[, multiSkillB = []] = getMultiRobotB() +3 > +4 > multiSkillB = [] +5 > +6 > multiSkillB = [] +7 > ] = getMultiRobotB(); +1->Emitted(13, 1) Source(22, 1) + SourceIndex(0) +2 >Emitted(13, 22) Source(22, 40) + SourceIndex(0) +3 >Emitted(13, 24) Source(22, 4) + SourceIndex(0) +4 >Emitted(13, 34) Source(22, 20) + SourceIndex(0) +5 >Emitted(13, 36) Source(22, 4) + SourceIndex(0) +6 >Emitted(13, 73) Source(22, 20) + SourceIndex(0) +7 >Emitted(13, 74) Source(22, 41) + SourceIndex(0) +--- +>>>_j = ["roomba", ["vaccum", "mopping"]], _k = _j[1], multiSkillB = _k === void 0 ? [] : _k; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^ +1-> + > +2 >[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]] +3 > +4 > multiSkillB = [] +5 > +6 > multiSkillB = [] +7 > ] = ["roomba", ["vaccum", "mopping"]]; +1->Emitted(14, 1) Source(23, 1) + SourceIndex(0) +2 >Emitted(14, 39) Source(23, 57) + SourceIndex(0) +3 >Emitted(14, 41) Source(23, 4) + SourceIndex(0) +4 >Emitted(14, 51) Source(23, 20) + SourceIndex(0) +5 >Emitted(14, 53) Source(23, 4) + SourceIndex(0) +6 >Emitted(14, 90) Source(23, 20) + SourceIndex(0) +7 >Emitted(14, 91) Source(23, 58) + SourceIndex(0) +--- +>>>_l = robotB[0], numberB = _l === void 0 ? -1 : _l; +1 > +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^-> +1 > + > + >[ +2 >numberB = -1 +3 > +4 > numberB = -1 +5 > ] = robotB; +1 >Emitted(15, 1) Source(25, 2) + SourceIndex(0) +2 >Emitted(15, 15) Source(25, 14) + SourceIndex(0) +3 >Emitted(15, 17) Source(25, 2) + SourceIndex(0) +4 >Emitted(15, 50) Source(25, 14) + SourceIndex(0) +5 >Emitted(15, 51) Source(25, 25) + SourceIndex(0) +--- +>>>_m = getRobotB()[0], numberB = _m === void 0 ? -1 : _m; +1-> +2 >^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^-> +1-> + >[ +2 >numberB = -1 +3 > +4 > numberB = -1 +5 > ] = getRobotB(); +1->Emitted(16, 1) Source(26, 2) + SourceIndex(0) +2 >Emitted(16, 20) Source(26, 14) + SourceIndex(0) +3 >Emitted(16, 22) Source(26, 2) + SourceIndex(0) +4 >Emitted(16, 55) Source(26, 14) + SourceIndex(0) +5 >Emitted(16, 56) Source(26, 30) + SourceIndex(0) +--- +>>>_o = [2, "trimmer", "trimming"][0], numberB = _o === void 0 ? -1 : _o; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +1-> + >[ +2 >numberB = -1 +3 > +4 > numberB = -1 +5 > ] = [2, "trimmer", "trimming"]; +1->Emitted(17, 1) Source(27, 2) + SourceIndex(0) +2 >Emitted(17, 35) Source(27, 14) + SourceIndex(0) +3 >Emitted(17, 37) Source(27, 2) + SourceIndex(0) +4 >Emitted(17, 70) Source(27, 14) + SourceIndex(0) +5 >Emitted(17, 71) Source(27, 45) + SourceIndex(0) +--- +>>>_p = multiRobotB[0], nameMB = _p === void 0 ? "helloNoName" : _p; +1 > +2 >^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^-> +1 > + >[ +2 >nameMB = "helloNoName" +3 > +4 > nameMB = "helloNoName" +5 > ] = multiRobotB; +1 >Emitted(18, 1) Source(28, 2) + SourceIndex(0) +2 >Emitted(18, 20) Source(28, 24) + SourceIndex(0) +3 >Emitted(18, 22) Source(28, 2) + SourceIndex(0) +4 >Emitted(18, 65) Source(28, 24) + SourceIndex(0) +5 >Emitted(18, 66) Source(28, 40) + SourceIndex(0) +--- +>>>_q = getMultiRobotB()[0], nameMB = _q === void 0 ? "helloNoName" : _q; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^-> +1-> + >[ +2 >nameMB = "helloNoName" +3 > +4 > nameMB = "helloNoName" +5 > ] = getMultiRobotB(); +1->Emitted(19, 1) Source(29, 2) + SourceIndex(0) +2 >Emitted(19, 25) Source(29, 24) + SourceIndex(0) +3 >Emitted(19, 27) Source(29, 2) + SourceIndex(0) +4 >Emitted(19, 70) Source(29, 24) + SourceIndex(0) +5 >Emitted(19, 71) Source(29, 45) + SourceIndex(0) +--- +>>>_r = ["trimmer", ["trimming", "edging"]][0], nameMB = _r === void 0 ? "helloNoName" : _r; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + >[ +2 >nameMB = "helloNoName" +3 > +4 > nameMB = "helloNoName" +5 > ] = ["trimmer", ["trimming", "edging"]]; +1->Emitted(20, 1) Source(30, 2) + SourceIndex(0) +2 >Emitted(20, 44) Source(30, 24) + SourceIndex(0) +3 >Emitted(20, 46) Source(30, 2) + SourceIndex(0) +4 >Emitted(20, 89) Source(30, 24) + SourceIndex(0) +5 >Emitted(20, 90) Source(30, 64) + SourceIndex(0) +--- +>>>_s = robotB[0], numberB = _s === void 0 ? -1 : _s, _t = robotB[1], nameB = _t === void 0 ? "helloNoName" : _t, _u = robotB[2], skillB = _u === void 0 ? "noSkill" : _u; +1-> +2 >^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^ +14> ^^^^^^^-> +1-> + > + >[ +2 >numberB = -1 +3 > +4 > numberB = -1 +5 > , +6 > nameB = "helloNoName" +7 > +8 > nameB = "helloNoName" +9 > , +10> skillB = "noSkill" +11> +12> skillB = "noSkill" +13> ] = robotB; +1->Emitted(21, 1) Source(32, 2) + SourceIndex(0) +2 >Emitted(21, 15) Source(32, 14) + SourceIndex(0) +3 >Emitted(21, 17) Source(32, 2) + SourceIndex(0) +4 >Emitted(21, 50) Source(32, 14) + SourceIndex(0) +5 >Emitted(21, 52) Source(32, 16) + SourceIndex(0) +6 >Emitted(21, 66) Source(32, 37) + SourceIndex(0) +7 >Emitted(21, 68) Source(32, 16) + SourceIndex(0) +8 >Emitted(21, 110) Source(32, 37) + SourceIndex(0) +9 >Emitted(21, 112) Source(32, 39) + SourceIndex(0) +10>Emitted(21, 126) Source(32, 57) + SourceIndex(0) +11>Emitted(21, 128) Source(32, 39) + SourceIndex(0) +12>Emitted(21, 167) Source(32, 57) + SourceIndex(0) +13>Emitted(21, 168) Source(32, 68) + SourceIndex(0) +--- +>>>_v = getRobotB(), _w = _v[0], numberB = _w === void 0 ? -1 : _w, _x = _v[1], nameB = _x === void 0 ? "helloNoName" : _x, _y = _v[2], skillB = _y === void 0 ? "noSkill" : _y; +1-> +2 >^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^ +16> ^^^^^^^^^^^^^^^^-> +1-> + > +2 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB() +3 > +4 > numberB = -1 +5 > +6 > numberB = -1 +7 > , +8 > nameB = "helloNoName" +9 > +10> nameB = "helloNoName" +11> , +12> skillB = "noSkill" +13> +14> skillB = "noSkill" +15> ] = getRobotB(); +1->Emitted(22, 1) Source(33, 1) + SourceIndex(0) +2 >Emitted(22, 17) Source(33, 72) + SourceIndex(0) +3 >Emitted(22, 19) Source(33, 2) + SourceIndex(0) +4 >Emitted(22, 29) Source(33, 14) + SourceIndex(0) +5 >Emitted(22, 31) Source(33, 2) + SourceIndex(0) +6 >Emitted(22, 64) Source(33, 14) + SourceIndex(0) +7 >Emitted(22, 66) Source(33, 16) + SourceIndex(0) +8 >Emitted(22, 76) Source(33, 37) + SourceIndex(0) +9 >Emitted(22, 78) Source(33, 16) + SourceIndex(0) +10>Emitted(22, 120) Source(33, 37) + SourceIndex(0) +11>Emitted(22, 122) Source(33, 39) + SourceIndex(0) +12>Emitted(22, 132) Source(33, 57) + SourceIndex(0) +13>Emitted(22, 134) Source(33, 39) + SourceIndex(0) +14>Emitted(22, 173) Source(33, 57) + SourceIndex(0) +15>Emitted(22, 174) Source(33, 73) + SourceIndex(0) +--- +>>>_z = [2, "trimmer", "trimming"], _0 = _z[0], numberB = _0 === void 0 ? -1 : _0, _1 = _z[1], nameB = _1 === void 0 ? "helloNoName" : _1, _2 = _z[2], skillB = _2 === void 0 ? "noSkill" : _2; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^ +16> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"] +3 > +4 > numberB = -1 +5 > +6 > numberB = -1 +7 > , +8 > nameB = "helloNoName" +9 > +10> nameB = "helloNoName" +11> , +12> skillB = "noSkill" +13> +14> skillB = "noSkill" +15> ] = [2, "trimmer", "trimming"]; +1->Emitted(23, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(23, 32) Source(34, 87) + SourceIndex(0) +3 >Emitted(23, 34) Source(34, 2) + SourceIndex(0) +4 >Emitted(23, 44) Source(34, 14) + SourceIndex(0) +5 >Emitted(23, 46) Source(34, 2) + SourceIndex(0) +6 >Emitted(23, 79) Source(34, 14) + SourceIndex(0) +7 >Emitted(23, 81) Source(34, 16) + SourceIndex(0) +8 >Emitted(23, 91) Source(34, 37) + SourceIndex(0) +9 >Emitted(23, 93) Source(34, 16) + SourceIndex(0) +10>Emitted(23, 135) Source(34, 37) + SourceIndex(0) +11>Emitted(23, 137) Source(34, 39) + SourceIndex(0) +12>Emitted(23, 147) Source(34, 57) + SourceIndex(0) +13>Emitted(23, 149) Source(34, 39) + SourceIndex(0) +14>Emitted(23, 188) Source(34, 57) + SourceIndex(0) +15>Emitted(23, 189) Source(34, 88) + SourceIndex(0) +--- +>>>_3 = multiRobotB[0], nameMB = _3 === void 0 ? "helloNoName" : _3, _4 = multiRobotB[1], _5 = _4 === void 0 ? [] : _4, _6 = _5[0], primarySkillB = _6 === void 0 ? "noSkill" : _6, _7 = _5[1], secondarySkillB = _7 === void 0 ? "noSkill" : _7; +1-> +2 >^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +17> ^ +18> ^^^^^^^^^^^^^^^^^^-> +1-> + >[ +2 >nameMB = "helloNoName" +3 > +4 > nameMB = "helloNoName" +5 > , +6 > [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] +7 > +8 > [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] +9 > +10> primarySkillB = "noSkill" +11> +12> primarySkillB = "noSkill" +13> , +14> secondarySkillB = "noSkill" +15> +16> secondarySkillB = "noSkill" +17> ] = []] = multiRobotB; +1->Emitted(24, 1) Source(35, 2) + SourceIndex(0) +2 >Emitted(24, 20) Source(35, 24) + SourceIndex(0) +3 >Emitted(24, 22) Source(35, 2) + SourceIndex(0) +4 >Emitted(24, 65) Source(35, 24) + SourceIndex(0) +5 >Emitted(24, 67) Source(35, 26) + SourceIndex(0) +6 >Emitted(24, 86) Source(35, 87) + SourceIndex(0) +7 >Emitted(24, 88) Source(35, 26) + SourceIndex(0) +8 >Emitted(24, 116) Source(35, 87) + SourceIndex(0) +9 >Emitted(24, 118) Source(35, 27) + SourceIndex(0) +10>Emitted(24, 128) Source(35, 52) + SourceIndex(0) +11>Emitted(24, 130) Source(35, 27) + SourceIndex(0) +12>Emitted(24, 176) Source(35, 52) + SourceIndex(0) +13>Emitted(24, 178) Source(35, 54) + SourceIndex(0) +14>Emitted(24, 188) Source(35, 81) + SourceIndex(0) +15>Emitted(24, 190) Source(35, 54) + SourceIndex(0) +16>Emitted(24, 238) Source(35, 81) + SourceIndex(0) +17>Emitted(24, 239) Source(35, 103) + SourceIndex(0) +--- +>>>_8 = getMultiRobotB(), _9 = _8[0], nameMB = _9 === void 0 ? "helloNoName" : _9, _10 = _8[1], _11 = _10 === void 0 ? [] : _10, _12 = _11[0], primarySkillB = _12 === void 0 ? "noSkill" : _12, _13 = _11[1], secondarySkillB = _13 === void 0 ? "noSkill" : _13; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^ +20> ^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB() +3 > +4 > nameMB = "helloNoName" +5 > +6 > nameMB = "helloNoName" +7 > , +8 > [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] +9 > +10> [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] +11> +12> primarySkillB = "noSkill" +13> +14> primarySkillB = "noSkill" +15> , +16> secondarySkillB = "noSkill" +17> +18> secondarySkillB = "noSkill" +19> ] = []] = getMultiRobotB(); +1->Emitted(25, 1) Source(36, 1) + SourceIndex(0) +2 >Emitted(25, 22) Source(36, 107) + SourceIndex(0) +3 >Emitted(25, 24) Source(36, 2) + SourceIndex(0) +4 >Emitted(25, 34) Source(36, 24) + SourceIndex(0) +5 >Emitted(25, 36) Source(36, 2) + SourceIndex(0) +6 >Emitted(25, 79) Source(36, 24) + SourceIndex(0) +7 >Emitted(25, 81) Source(36, 26) + SourceIndex(0) +8 >Emitted(25, 92) Source(36, 87) + SourceIndex(0) +9 >Emitted(25, 94) Source(36, 26) + SourceIndex(0) +10>Emitted(25, 125) Source(36, 87) + SourceIndex(0) +11>Emitted(25, 127) Source(36, 27) + SourceIndex(0) +12>Emitted(25, 139) Source(36, 52) + SourceIndex(0) +13>Emitted(25, 141) Source(36, 27) + SourceIndex(0) +14>Emitted(25, 189) Source(36, 52) + SourceIndex(0) +15>Emitted(25, 191) Source(36, 54) + SourceIndex(0) +16>Emitted(25, 203) Source(36, 81) + SourceIndex(0) +17>Emitted(25, 205) Source(36, 54) + SourceIndex(0) +18>Emitted(25, 255) Source(36, 81) + SourceIndex(0) +19>Emitted(25, 256) Source(36, 108) + SourceIndex(0) +--- +>>>_14 = ["trimmer", ["trimming", "edging"]], _15 = _14[0], nameMB = _15 === void 0 ? "helloNoName" : _15, _16 = _14[1], _17 = _16 === void 0 ? [] : _16, _18 = _17[0], primarySkillB = _18 === void 0 ? "noSkill" : _18, _19 = _17[1], secondarySkillB = _19 === void 0 ? "noSkill" : _19; +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^ +9 > ^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^ +13> ^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^ +16> ^^^^^^^^^^^^ +17> ^^ +18> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19> ^ +1-> + > +2 >[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = + > ["trimmer", ["trimming", "edging"]] +3 > +4 > nameMB = "helloNoName" +5 > +6 > nameMB = "helloNoName" +7 > , +8 > [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] +9 > +10> [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] +11> +12> primarySkillB = "noSkill" +13> +14> primarySkillB = "noSkill" +15> , +16> secondarySkillB = "noSkill" +17> +18> secondarySkillB = "noSkill" +19> ] = []] = + > ["trimmer", ["trimming", "edging"]]; +1->Emitted(26, 1) Source(37, 1) + SourceIndex(0) +2 >Emitted(26, 42) Source(38, 40) + SourceIndex(0) +3 >Emitted(26, 44) Source(37, 2) + SourceIndex(0) +4 >Emitted(26, 56) Source(37, 24) + SourceIndex(0) +5 >Emitted(26, 58) Source(37, 2) + SourceIndex(0) +6 >Emitted(26, 103) Source(37, 24) + SourceIndex(0) +7 >Emitted(26, 105) Source(37, 26) + SourceIndex(0) +8 >Emitted(26, 117) Source(37, 87) + SourceIndex(0) +9 >Emitted(26, 119) Source(37, 26) + SourceIndex(0) +10>Emitted(26, 150) Source(37, 87) + SourceIndex(0) +11>Emitted(26, 152) Source(37, 27) + SourceIndex(0) +12>Emitted(26, 164) Source(37, 52) + SourceIndex(0) +13>Emitted(26, 166) Source(37, 27) + SourceIndex(0) +14>Emitted(26, 214) Source(37, 52) + SourceIndex(0) +15>Emitted(26, 216) Source(37, 54) + SourceIndex(0) +16>Emitted(26, 228) Source(37, 81) + SourceIndex(0) +17>Emitted(26, 230) Source(37, 54) + SourceIndex(0) +18>Emitted(26, 280) Source(37, 81) + SourceIndex(0) +19>Emitted(26, 281) Source(38, 41) + SourceIndex(0) +--- +>>>_20 = robotB[0], numberB = _20 === void 0 ? -1 : _20, robotAInfo = robotB.slice(1); +1 > +2 >^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^ +8 > ^^^^^^^^^^^^^^-> +1 > + > + >[ +2 >numberB = -1 +3 > +4 > numberB = -1 +5 > , +6 > ...robotAInfo +7 > ] = robotB; +1 >Emitted(27, 1) Source(40, 2) + SourceIndex(0) +2 >Emitted(27, 16) Source(40, 14) + SourceIndex(0) +3 >Emitted(27, 18) Source(40, 2) + SourceIndex(0) +4 >Emitted(27, 53) Source(40, 14) + SourceIndex(0) +5 >Emitted(27, 55) Source(40, 16) + SourceIndex(0) +6 >Emitted(27, 83) Source(40, 29) + SourceIndex(0) +7 >Emitted(27, 84) Source(40, 40) + SourceIndex(0) +--- +>>>_21 = getRobotB(), _22 = _21[0], numberB = _22 === void 0 ? -1 : _22, robotAInfo = _21.slice(1); +1-> +2 >^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^ +10> ^^^^^^^^^^^^^^^^-> +1-> + > +2 >[numberB = -1, ...robotAInfo] = getRobotB() +3 > +4 > numberB = -1 +5 > +6 > numberB = -1 +7 > , +8 > ...robotAInfo +9 > ] = getRobotB(); +1->Emitted(28, 1) Source(41, 1) + SourceIndex(0) +2 >Emitted(28, 18) Source(41, 44) + SourceIndex(0) +3 >Emitted(28, 20) Source(41, 2) + SourceIndex(0) +4 >Emitted(28, 32) Source(41, 14) + SourceIndex(0) +5 >Emitted(28, 34) Source(41, 2) + SourceIndex(0) +6 >Emitted(28, 69) Source(41, 14) + SourceIndex(0) +7 >Emitted(28, 71) Source(41, 16) + SourceIndex(0) +8 >Emitted(28, 96) Source(41, 29) + SourceIndex(0) +9 >Emitted(28, 97) Source(41, 45) + SourceIndex(0) +--- +>>>_23 = [2, "trimmer", "trimming"], _24 = _23[0], numberB = _24 === void 0 ? -1 : _24, robotAInfo = _23.slice(1); +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^ +5 > ^^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +7 > ^^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^ +9 > ^ +1-> + > +2 >[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"] +3 > +4 > numberB = -1 +5 > +6 > numberB = -1 +7 > , +8 > ...robotAInfo +9 > ] = [2, "trimmer", "trimming"]; +1->Emitted(29, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(29, 33) Source(42, 66) + SourceIndex(0) +3 >Emitted(29, 35) Source(42, 2) + SourceIndex(0) +4 >Emitted(29, 47) Source(42, 14) + SourceIndex(0) +5 >Emitted(29, 49) Source(42, 2) + SourceIndex(0) +6 >Emitted(29, 84) Source(42, 14) + SourceIndex(0) +7 >Emitted(29, 86) Source(42, 16) + SourceIndex(0) +8 >Emitted(29, 111) Source(42, 29) + SourceIndex(0) +9 >Emitted(29, 112) Source(42, 67) + SourceIndex(0) +--- +>>>if (nameA == nameB) { +1 > +2 >^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^ +7 > ^^^^^ +8 > ^ +9 > ^ +10> ^ +11> ^^^^-> +1 > + > + > +2 >if +3 > +4 > ( +5 > nameA +6 > == +7 > nameB +8 > ) +9 > +10> { +1 >Emitted(30, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(30, 3) Source(44, 3) + SourceIndex(0) +3 >Emitted(30, 4) Source(44, 4) + SourceIndex(0) +4 >Emitted(30, 5) Source(44, 5) + SourceIndex(0) +5 >Emitted(30, 10) Source(44, 10) + SourceIndex(0) +6 >Emitted(30, 14) Source(44, 14) + SourceIndex(0) +7 >Emitted(30, 19) Source(44, 19) + SourceIndex(0) +8 >Emitted(30, 20) Source(44, 20) + SourceIndex(0) +9 >Emitted(30, 21) Source(44, 21) + SourceIndex(0) +10>Emitted(30, 22) Source(44, 22) + SourceIndex(0) +--- +>>> console.log(skillB); +1->^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^ +7 > ^ +8 > ^ +1-> + > +2 > console +3 > . +4 > log +5 > ( +6 > skillB +7 > ) +8 > ; +1->Emitted(31, 5) Source(45, 5) + SourceIndex(0) +2 >Emitted(31, 12) Source(45, 12) + SourceIndex(0) +3 >Emitted(31, 13) Source(45, 13) + SourceIndex(0) +4 >Emitted(31, 16) Source(45, 16) + SourceIndex(0) +5 >Emitted(31, 17) Source(45, 17) + SourceIndex(0) +6 >Emitted(31, 23) Source(45, 23) + SourceIndex(0) +7 >Emitted(31, 24) Source(45, 24) + SourceIndex(0) +8 >Emitted(31, 25) Source(45, 25) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(32, 1) Source(46, 1) + SourceIndex(0) +2 >Emitted(32, 2) Source(46, 2) + SourceIndex(0) +--- +>>>function getRobotB() { +1-> +2 >^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +1->Emitted(33, 1) Source(48, 1) + SourceIndex(0) +--- +>>> return robotB; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +1->function getRobotB() { + > +2 > return +3 > +4 > robotB +5 > ; +1->Emitted(34, 5) Source(49, 5) + SourceIndex(0) +2 >Emitted(34, 11) Source(49, 11) + SourceIndex(0) +3 >Emitted(34, 12) Source(49, 12) + SourceIndex(0) +4 >Emitted(34, 18) Source(49, 18) + SourceIndex(0) +5 >Emitted(34, 19) Source(49, 19) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(35, 1) Source(50, 1) + SourceIndex(0) +2 >Emitted(35, 2) Source(50, 2) + SourceIndex(0) +--- +>>>function getMultiRobotB() { +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +1->Emitted(36, 1) Source(52, 1) + SourceIndex(0) +--- +>>> return multiRobotB; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^ +1->function getMultiRobotB() { + > +2 > return +3 > +4 > multiRobotB +5 > ; +1->Emitted(37, 5) Source(53, 5) + SourceIndex(0) +2 >Emitted(37, 11) Source(53, 11) + SourceIndex(0) +3 >Emitted(37, 12) Source(53, 12) + SourceIndex(0) +4 >Emitted(37, 23) Source(53, 23) + SourceIndex(0) +5 >Emitted(37, 24) Source(53, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(38, 1) Source(54, 1) + SourceIndex(0) +2 >Emitted(38, 2) Source(54, 2) + SourceIndex(0) +--- +>>>var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24; +>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.symbols b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.symbols new file mode 100644 index 00000000000..c4d6b52fc4a --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.symbols @@ -0,0 +1,167 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 1, 8)) +} +type Robot = [number, string, string]; +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 2, 1)) + +type MultiSkilledRobot = [string, string[]]; +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 3, 38)) + +var robotA: Robot = [1, "mower", "mowing"]; +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 6, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 2, 1)) + +var robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 7, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 2, 1)) + +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : Symbol(multiRobotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 8, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 3, 38)) + +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 9, 3)) +>MultiSkilledRobot : Symbol(MultiSkilledRobot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 3, 38)) + +let nameA: string, numberB: number, nameB: string, skillB: string; +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 3)) +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 35)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 50)) + +let robotAInfo: (number | string)[]; +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 12, 3)) + +let multiSkillB: string[], nameMB: string, primarySkillB: string, secondarySkillB: string; +>multiSkillB : Symbol(multiSkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 3)) +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 26)) +>primarySkillB : Symbol(primarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 42)) +>secondarySkillB : Symbol(secondarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 65)) + +let multiRobotAInfo: (string | string[])[]; +>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 15, 3)) + +[, nameA = "helloNoName"] = robotA; +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 3)) +>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 6, 3)) + +[, nameB = "helloNoName"] = getRobotB(); +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 35)) +>getRobotB : Symbol(getRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 45, 1)) + +[, nameB = "helloNoName"] = [2, "trimmer", "trimming"]; +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 35)) + +[, multiSkillB = []] = multiRobotB; +>multiSkillB : Symbol(multiSkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 3)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 9, 3)) + +[, multiSkillB = []] = getMultiRobotB(); +>multiSkillB : Symbol(multiSkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 3)) +>getMultiRobotB : Symbol(getMultiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 49, 1)) + +[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]]; +>multiSkillB : Symbol(multiSkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 3)) + +[numberB = -1] = robotB; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 7, 3)) + +[numberB = -1] = getRobotB(); +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>getRobotB : Symbol(getRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 45, 1)) + +[numberB = -1] = [2, "trimmer", "trimming"]; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) + +[nameMB = "helloNoName"] = multiRobotB; +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 26)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 9, 3)) + +[nameMB = "helloNoName"] = getMultiRobotB(); +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 26)) +>getMultiRobotB : Symbol(getMultiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 49, 1)) + +[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]]; +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 26)) + +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 35)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 50)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 7, 3)) + +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB(); +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 35)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 50)) +>getRobotB : Symbol(getRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 45, 1)) + +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"]; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 35)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 50)) + +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB; +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 26)) +>primarySkillB : Symbol(primarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 42)) +>secondarySkillB : Symbol(secondarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 65)) +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 9, 3)) + +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB(); +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 26)) +>primarySkillB : Symbol(primarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 42)) +>secondarySkillB : Symbol(secondarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 65)) +>getMultiRobotB : Symbol(getMultiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 49, 1)) + +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = +>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 26)) +>primarySkillB : Symbol(primarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 42)) +>secondarySkillB : Symbol(secondarySkillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 14, 65)) + + ["trimmer", ["trimming", "edging"]]; + +[numberB = -1, ...robotAInfo] = robotB; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 12, 3)) +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 7, 3)) + +[numberB = -1, ...robotAInfo] = getRobotB(); +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 12, 3)) +>getRobotB : Symbol(getRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 45, 1)) + +[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"]; +>numberB : Symbol(numberB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 18)) +>robotAInfo : Symbol(robotAInfo, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 12, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 2, 1)) + +if (nameA == nameB) { +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 3)) +>nameB : Symbol(nameB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 35)) + + console.log(skillB); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 0, 22)) +>skillB : Symbol(skillB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 11, 50)) +} + +function getRobotB() { +>getRobotB : Symbol(getRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 45, 1)) + + return robotB; +>robotB : Symbol(robotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 7, 3)) +} + +function getMultiRobotB() { +>getMultiRobotB : Symbol(getMultiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 49, 1)) + + return multiRobotB; +>multiRobotB : Symbol(multiRobotB, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts, 9, 3)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.types b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.types new file mode 100644 index 00000000000..7edf6c63e4a --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.types @@ -0,0 +1,361 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts === +declare var console: { +>console : { log(msg: any): void; } + + log(msg: any): void; +>log : (msg: any) => void +>msg : any +} +type Robot = [number, string, string]; +>Robot : [number, string, string] + +type MultiSkilledRobot = [string, string[]]; +>MultiSkilledRobot : [string, string[]] + +var robotA: Robot = [1, "mower", "mowing"]; +>robotA : [number, string, string] +>Robot : [number, string, string] +>[1, "mower", "mowing"] : [number, string, string] +>1 : number +>"mower" : string +>"mowing" : string + +var robotB: Robot = [2, "trimmer", "trimming"]; +>robotB : [number, string, string] +>Robot : [number, string, string] +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +>multiRobotA : [string, string[]] +>MultiSkilledRobot : [string, string[]] +>["mower", ["mowing", ""]] : [string, string[]] +>"mower" : string +>["mowing", ""] : string[] +>"mowing" : string +>"" : string + +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; +>multiRobotB : [string, string[]] +>MultiSkilledRobot : [string, string[]] +>["trimmer", ["trimming", "edging"]] : [string, string[]] +>"trimmer" : string +>["trimming", "edging"] : string[] +>"trimming" : string +>"edging" : string + +let nameA: string, numberB: number, nameB: string, skillB: string; +>nameA : string +>numberB : number +>nameB : string +>skillB : string + +let robotAInfo: (number | string)[]; +>robotAInfo : (number | string)[] + +let multiSkillB: string[], nameMB: string, primarySkillB: string, secondarySkillB: string; +>multiSkillB : string[] +>nameMB : string +>primarySkillB : string +>secondarySkillB : string + +let multiRobotAInfo: (string | string[])[]; +>multiRobotAInfo : (string | string[])[] + +[, nameA = "helloNoName"] = robotA; +>[, nameA = "helloNoName"] = robotA : [number, string, string] +>[, nameA = "helloNoName"] : [undefined, string] +> : undefined +>nameA = "helloNoName" : string +>nameA : string +>"helloNoName" : string +>robotA : [number, string, string] + +[, nameB = "helloNoName"] = getRobotB(); +>[, nameB = "helloNoName"] = getRobotB() : [number, string, string] +>[, nameB = "helloNoName"] : [undefined, string] +> : undefined +>nameB = "helloNoName" : string +>nameB : string +>"helloNoName" : string +>getRobotB() : [number, string, string] +>getRobotB : () => [number, string, string] + +[, nameB = "helloNoName"] = [2, "trimmer", "trimming"]; +>[, nameB = "helloNoName"] = [2, "trimmer", "trimming"] : [number, string, string] +>[, nameB = "helloNoName"] : [undefined, string] +> : undefined +>nameB = "helloNoName" : string +>nameB : string +>"helloNoName" : string +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +[, multiSkillB = []] = multiRobotB; +>[, multiSkillB = []] = multiRobotB : [string, string[]] +>[, multiSkillB = []] : [undefined, undefined[]] +> : undefined +>multiSkillB = [] : undefined[] +>multiSkillB : string[] +>[] : undefined[] +>multiRobotB : [string, string[]] + +[, multiSkillB = []] = getMultiRobotB(); +>[, multiSkillB = []] = getMultiRobotB() : [string, string[]] +>[, multiSkillB = []] : [undefined, undefined[]] +> : undefined +>multiSkillB = [] : undefined[] +>multiSkillB : string[] +>[] : undefined[] +>getMultiRobotB() : [string, string[]] +>getMultiRobotB : () => [string, string[]] + +[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]]; +>[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]] : [string, string[]] +>[, multiSkillB = []] : [undefined, undefined[]] +> : undefined +>multiSkillB = [] : undefined[] +>multiSkillB : string[] +>[] : undefined[] +>["roomba", ["vaccum", "mopping"]] : [string, string[]] +>"roomba" : string +>["vaccum", "mopping"] : string[] +>"vaccum" : string +>"mopping" : string + +[numberB = -1] = robotB; +>[numberB = -1] = robotB : [number, string, string] +>[numberB = -1] : [number] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>robotB : [number, string, string] + +[numberB = -1] = getRobotB(); +>[numberB = -1] = getRobotB() : [number, string, string] +>[numberB = -1] : [number] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>getRobotB() : [number, string, string] +>getRobotB : () => [number, string, string] + +[numberB = -1] = [2, "trimmer", "trimming"]; +>[numberB = -1] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB = -1] : [number] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +[nameMB = "helloNoName"] = multiRobotB; +>[nameMB = "helloNoName"] = multiRobotB : [string, string[]] +>[nameMB = "helloNoName"] : [string] +>nameMB = "helloNoName" : string +>nameMB : string +>"helloNoName" : string +>multiRobotB : [string, string[]] + +[nameMB = "helloNoName"] = getMultiRobotB(); +>[nameMB = "helloNoName"] = getMultiRobotB() : [string, string[]] +>[nameMB = "helloNoName"] : [string] +>nameMB = "helloNoName" : string +>nameMB : string +>"helloNoName" : string +>getMultiRobotB() : [string, string[]] +>getMultiRobotB : () => [string, string[]] + +[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]]; +>[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]] : [string, string[]] +>[nameMB = "helloNoName"] : [string] +>nameMB = "helloNoName" : string +>nameMB : string +>"helloNoName" : string +>["trimmer", ["trimming", "edging"]] : [string, string[]] +>"trimmer" : string +>["trimming", "edging"] : string[] +>"trimming" : string +>"edging" : string + +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB; +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB : [number, string, string] +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] : [number, string, string] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>nameB = "helloNoName" : string +>nameB : string +>"helloNoName" : string +>skillB = "noSkill" : string +>skillB : string +>"noSkill" : string +>robotB : [number, string, string] + +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB(); +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB() : [number, string, string] +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] : [number, string, string] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>nameB = "helloNoName" : string +>nameB : string +>"helloNoName" : string +>skillB = "noSkill" : string +>skillB : string +>"noSkill" : string +>getRobotB() : [number, string, string] +>getRobotB : () => [number, string, string] + +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"]; +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] : [number, string, string] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>nameB = "helloNoName" : string +>nameB : string +>"helloNoName" : string +>skillB = "noSkill" : string +>skillB : string +>"noSkill" : string +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB; +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB : [string, string[]] +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, [string, string]] +>nameMB = "helloNoName" : string +>nameMB : string +>"helloNoName" : string +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : [string, string] +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : [string, string] +>primarySkillB = "noSkill" : string +>primarySkillB : string +>"noSkill" : string +>secondarySkillB = "noSkill" : string +>secondarySkillB : string +>"noSkill" : string +>[] : [string, string] +>multiRobotB : [string, string[]] + +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB(); +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB() : [string, string[]] +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, [string, string]] +>nameMB = "helloNoName" : string +>nameMB : string +>"helloNoName" : string +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : [string, string] +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : [string, string] +>primarySkillB = "noSkill" : string +>primarySkillB : string +>"noSkill" : string +>secondarySkillB = "noSkill" : string +>secondarySkillB : string +>"noSkill" : string +>[] : [string, string] +>getMultiRobotB() : [string, string[]] +>getMultiRobotB : () => [string, string[]] + +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, [string, string]] +>nameMB = "helloNoName" : string +>nameMB : string +>"helloNoName" : string +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : [string, string] +>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : [string, string] +>primarySkillB = "noSkill" : string +>primarySkillB : string +>"noSkill" : string +>secondarySkillB = "noSkill" : string +>secondarySkillB : string +>"noSkill" : string +>[] : [string, string] + + ["trimmer", ["trimming", "edging"]]; +>["trimmer", ["trimming", "edging"]] : [string, [string, string]] +>"trimmer" : string +>["trimming", "edging"] : [string, string] +>"trimming" : string +>"edging" : string + +[numberB = -1, ...robotAInfo] = robotB; +>[numberB = -1, ...robotAInfo] = robotB : [number, string, string] +>[numberB = -1, ...robotAInfo] : (number | string)[] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>robotB : [number, string, string] + +[numberB = -1, ...robotAInfo] = getRobotB(); +>[numberB = -1, ...robotAInfo] = getRobotB() : [number, string, string] +>[numberB = -1, ...robotAInfo] : (number | string)[] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>getRobotB() : [number, string, string] +>getRobotB : () => [number, string, string] + +[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"]; +>[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"] : [number, string, string] +>[numberB = -1, ...robotAInfo] : (number | string)[] +>numberB = -1 : number +>numberB : number +>-1 : number +>1 : number +>...robotAInfo : number | string +>robotAInfo : (number | string)[] +>[2, "trimmer", "trimming"] : [number, string, string] +>Robot : [number, string, string] +>[2, "trimmer", "trimming"] : [number, string, string] +>2 : number +>"trimmer" : string +>"trimming" : string + +if (nameA == nameB) { +>nameA == nameB : boolean +>nameA : string +>nameB : string + + console.log(skillB); +>console.log(skillB) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>skillB : string +} + +function getRobotB() { +>getRobotB : () => [number, string, string] + + return robotB; +>robotB : [number, string, string] +} + +function getMultiRobotB() { +>getMultiRobotB : () => [string, string[]] + + return multiRobotB; +>multiRobotB : [string, string[]] +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts new file mode 100644 index 00000000000..253d96d4b35 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.ts @@ -0,0 +1,55 @@ +// @sourcemap: true +declare var console: { + log(msg: any): void; +} +type Robot = [number, string, string]; +type MultiSkilledRobot = [string, string[]]; + +var robotA: Robot = [1, "mower", "mowing"]; +var robotB: Robot = [2, "trimmer", "trimming"]; +var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]; +var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]; + +let nameA: string, numberB: number, nameB: string, skillB: string; +let robotAInfo: (number | string)[]; + +let multiSkillB: string[], nameMB: string, primarySkillB: string, secondarySkillB: string; +let multiRobotAInfo: (string | string[])[]; + +[, nameA = "helloNoName"] = robotA; +[, nameB = "helloNoName"] = getRobotB(); +[, nameB = "helloNoName"] = [2, "trimmer", "trimming"]; +[, multiSkillB = []] = multiRobotB; +[, multiSkillB = []] = getMultiRobotB(); +[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]]; + +[numberB = -1] = robotB; +[numberB = -1] = getRobotB(); +[numberB = -1] = [2, "trimmer", "trimming"]; +[nameMB = "helloNoName"] = multiRobotB; +[nameMB = "helloNoName"] = getMultiRobotB(); +[nameMB = "helloNoName"] = ["trimmer", ["trimming", "edging"]]; + +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = robotB; +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = getRobotB(); +[numberB = -1, nameB = "helloNoName", skillB = "noSkill"] = [2, "trimmer", "trimming"]; +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB; +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB(); +[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = + ["trimmer", ["trimming", "edging"]]; + +[numberB = -1, ...robotAInfo] = robotB; +[numberB = -1, ...robotAInfo] = getRobotB(); +[numberB = -1, ...robotAInfo] = [2, "trimmer", "trimming"]; + +if (nameA == nameB) { + console.log(skillB); +} + +function getRobotB() { + return robotB; +} + +function getMultiRobotB() { + return multiRobotB; +} \ No newline at end of file