diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js new file mode 100644 index 00000000000..ca29b2eabd8 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js @@ -0,0 +1,114 @@ +//// [sourceMapValidationDestructuringForObjectBindingPattern.ts] +declare var console: { + log(msg: any): void; +} +interface Robot { + name: string; + skill: string; +} + +interface MultiRobot { + name: string; + skills: { + primary: string; + secondary: string; + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function getRobot() { + return robot; +} +function getMultiRobot() { + return multiRobot; +} + +for (let {name: nameA } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + +for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + +//// [sourceMapValidationDestructuringForObjectBindingPattern.js] +var robot = { name: "mower", skill: "mowing" }; +var multiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function getRobot() { + return robot; +} +function getMultiRobot() { + return multiRobot; +} +for (var nameA = robot.name, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var nameA = getRobot().name, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var nameA = { name: "trimmer", skill: "trimming" }.name, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _a = multiRobot.skills, primaryA = _a.primary, secondaryA = _a.secondary, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (var _b = getMultiRobot().skills, primaryA = _b.primary, secondaryA = _b.secondary, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (var _c = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }.skills, primaryA = _c.primary, secondaryA = _c.secondary, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (var nameA = robot.name, skillA = robot.skill, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _d = getRobot(), nameA = _d.name, skillA = _d.skill, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var _e = { name: "trimmer", skill: "trimming" }, nameA = _e.name, skillA = _e.skill, i = 0; i < 1; i++) { + console.log(nameA); +} +for (var nameA = multiRobot.name, _f = multiRobot.skills, primaryA = _f.primary, secondaryA = _f.secondary, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (var _g = getMultiRobot(), nameA = _g.name, _h = _g.skills, primaryA = _h.primary, secondaryA = _h.secondary, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (var _j = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, nameA = _j.name, _k = _j.skills, primaryA = _k.primary, secondaryA = _k.secondary, i = 0; i < 1; i++) { + console.log(primaryA); +} +//# sourceMappingURL=sourceMapValidationDestructuringForObjectBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map new file mode 100644 index 00000000000..b931afe67b0 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.js.map @@ -0,0 +1,2 @@ +//// [sourceMapValidationDestructuringForObjectBindingPattern.js.map] +{"version":3,"file":"sourceMapValidationDestructuringForObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringForObjectBindingPattern.ts"],"names":[],"mappings":"AAgBA,IAAI,KAAK,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACtD,IAAI,UAAU,GAAe,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACjG;IACI,MAAM,CAAC,KAAK,CAAC;AACjB,CAAC;AACD;IACI,MAAM,CAAC,UAAU,CAAC;AACtB,CAAC;AAED,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAsB,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,uBAA2B,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACtD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAC,mDAA8D,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACzF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAG,sBAAM,EAAI,qBAAiB,EAAE,yBAAqB,EAAmB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAChG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAG,2BAAM,EAAI,qBAAiB,EAAE,yBAAqB,EAAwB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACrG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAG,qFAAM,EAAI,qBAAiB,EAAE,yBAAqB,EAEzD,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AAED,GAAG,CAAC,CAAC,GAAG,CAAE,kBAAW,EAAE,oBAAa,EAAY,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAChE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAiC,eAAU,EAAzC,eAAW,EAAE,iBAAa,EAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACrE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAiC,2CAA6C,EAA5E,eAAW,EAAE,iBAAa,EAAoD,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACxG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAE,uBAAW,EAAE,sBAAM,EAAI,qBAAiB,EAAE,yBAAqB,EAAmB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC5G,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CAAwE,oBAAe,EAArF,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB,EAAwB,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACjH,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC;AACD,GAAG,CAAC,CAAC,GAAG,CACJ,8EAAqF,EAD/E,eAAW,EAAE,cAAM,EAAI,qBAAiB,EAAE,yBAAqB,EAErE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt new file mode 100644 index 00000000000..f598cc385f8 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.sourcemap.txt @@ -0,0 +1,1550 @@ +=================================================================== +JsFile: sourceMapValidationDestructuringForObjectBindingPattern.js +mapUrl: sourceMapValidationDestructuringForObjectBindingPattern.js.map +sourceRoot: +sources: sourceMapValidationDestructuringForObjectBindingPattern.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern.js +sourceFile:sourceMapValidationDestructuringForObjectBindingPattern.ts +------------------------------------------------------------------- +>>>var robot = { name: "mower", skill: "mowing" }; +1 > +2 >^^^^ +3 > ^^^^^ +4 > ^^^ +5 > ^^ +6 > ^^^^ +7 > ^^ +8 > ^^^^^^^ +9 > ^^ +10> ^^^^^ +11> ^^ +12> ^^^^^^^^ +13> ^^ +14> ^ +15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +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 > robot +4 > : Robot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skill +11> : +12> "mowing" +13> } +14> ; +1 >Emitted(1, 1) Source(17, 1) + SourceIndex(0) +2 >Emitted(1, 5) Source(17, 5) + SourceIndex(0) +3 >Emitted(1, 10) Source(17, 10) + SourceIndex(0) +4 >Emitted(1, 13) Source(17, 20) + SourceIndex(0) +5 >Emitted(1, 15) Source(17, 22) + SourceIndex(0) +6 >Emitted(1, 19) Source(17, 26) + SourceIndex(0) +7 >Emitted(1, 21) Source(17, 28) + SourceIndex(0) +8 >Emitted(1, 28) Source(17, 35) + SourceIndex(0) +9 >Emitted(1, 30) Source(17, 37) + SourceIndex(0) +10>Emitted(1, 35) Source(17, 42) + SourceIndex(0) +11>Emitted(1, 37) Source(17, 44) + SourceIndex(0) +12>Emitted(1, 45) Source(17, 52) + SourceIndex(0) +13>Emitted(1, 47) Source(17, 54) + SourceIndex(0) +14>Emitted(1, 48) Source(17, 55) + SourceIndex(0) +--- +>>>var multiRobot = { 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 > multiRobot +4 > : MultiRobot = +5 > { +6 > name +7 > : +8 > "mower" +9 > , +10> skills +11> : +12> { +13> primary +14> : +15> "mowing" +16> , +17> secondary +18> : +19> "none" +20> } +21> } +22> ; +1->Emitted(2, 1) Source(18, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(18, 5) + SourceIndex(0) +3 >Emitted(2, 15) Source(18, 15) + SourceIndex(0) +4 >Emitted(2, 18) Source(18, 30) + SourceIndex(0) +5 >Emitted(2, 20) Source(18, 32) + SourceIndex(0) +6 >Emitted(2, 24) Source(18, 36) + SourceIndex(0) +7 >Emitted(2, 26) Source(18, 38) + SourceIndex(0) +8 >Emitted(2, 33) Source(18, 45) + SourceIndex(0) +9 >Emitted(2, 35) Source(18, 47) + SourceIndex(0) +10>Emitted(2, 41) Source(18, 53) + SourceIndex(0) +11>Emitted(2, 43) Source(18, 55) + SourceIndex(0) +12>Emitted(2, 45) Source(18, 57) + SourceIndex(0) +13>Emitted(2, 52) Source(18, 64) + SourceIndex(0) +14>Emitted(2, 54) Source(18, 66) + SourceIndex(0) +15>Emitted(2, 62) Source(18, 74) + SourceIndex(0) +16>Emitted(2, 64) Source(18, 76) + SourceIndex(0) +17>Emitted(2, 73) Source(18, 85) + SourceIndex(0) +18>Emitted(2, 75) Source(18, 87) + SourceIndex(0) +19>Emitted(2, 81) Source(18, 93) + SourceIndex(0) +20>Emitted(2, 83) Source(18, 95) + SourceIndex(0) +21>Emitted(2, 85) Source(18, 97) + SourceIndex(0) +22>Emitted(2, 86) Source(18, 98) + SourceIndex(0) +--- +>>>function getRobot() { +1 > +2 >^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(3, 1) Source(19, 1) + SourceIndex(0) +--- +>>> return robot; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^ +5 > ^ +1->function getRobot() { + > +2 > return +3 > +4 > robot +5 > ; +1->Emitted(4, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(4, 11) Source(20, 11) + SourceIndex(0) +3 >Emitted(4, 12) Source(20, 12) + SourceIndex(0) +4 >Emitted(4, 17) Source(20, 17) + SourceIndex(0) +5 >Emitted(4, 18) Source(20, 18) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(5, 1) Source(21, 1) + SourceIndex(0) +2 >Emitted(5, 2) Source(21, 2) + SourceIndex(0) +--- +>>>function getMultiRobot() { +1-> +2 >^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +1->Emitted(6, 1) Source(22, 1) + SourceIndex(0) +--- +>>> return multiRobot; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^ +5 > ^ +1->function getMultiRobot() { + > +2 > return +3 > +4 > multiRobot +5 > ; +1->Emitted(7, 5) Source(23, 5) + SourceIndex(0) +2 >Emitted(7, 11) Source(23, 11) + SourceIndex(0) +3 >Emitted(7, 12) Source(23, 12) + SourceIndex(0) +4 >Emitted(7, 22) Source(23, 22) + SourceIndex(0) +5 >Emitted(7, 23) Source(23, 23) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(8, 1) Source(24, 1) + SourceIndex(0) +2 >Emitted(8, 2) Source(24, 2) + SourceIndex(0) +--- +>>>for (var nameA = robot.name, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > let +6 > +7 > {name: nameA } = robot +8 > , +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(9, 1) Source(26, 1) + SourceIndex(0) +2 >Emitted(9, 4) Source(26, 4) + SourceIndex(0) +3 >Emitted(9, 5) Source(26, 5) + SourceIndex(0) +4 >Emitted(9, 6) Source(26, 6) + SourceIndex(0) +5 >Emitted(9, 9) Source(26, 9) + SourceIndex(0) +6 >Emitted(9, 10) Source(26, 10) + SourceIndex(0) +7 >Emitted(9, 28) Source(26, 32) + SourceIndex(0) +8 >Emitted(9, 30) Source(26, 34) + SourceIndex(0) +9 >Emitted(9, 31) Source(26, 35) + SourceIndex(0) +10>Emitted(9, 34) Source(26, 38) + SourceIndex(0) +11>Emitted(9, 35) Source(26, 39) + SourceIndex(0) +12>Emitted(9, 37) Source(26, 41) + SourceIndex(0) +13>Emitted(9, 38) Source(26, 42) + SourceIndex(0) +14>Emitted(9, 41) Source(26, 45) + SourceIndex(0) +15>Emitted(9, 42) Source(26, 46) + SourceIndex(0) +16>Emitted(9, 44) Source(26, 48) + SourceIndex(0) +17>Emitted(9, 45) Source(26, 49) + SourceIndex(0) +18>Emitted(9, 47) Source(26, 51) + SourceIndex(0) +19>Emitted(9, 49) Source(26, 53) + SourceIndex(0) +20>Emitted(9, 50) Source(26, 54) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(10, 5) Source(27, 5) + SourceIndex(0) +2 >Emitted(10, 12) Source(27, 12) + SourceIndex(0) +3 >Emitted(10, 13) Source(27, 13) + SourceIndex(0) +4 >Emitted(10, 16) Source(27, 16) + SourceIndex(0) +5 >Emitted(10, 17) Source(27, 17) + SourceIndex(0) +6 >Emitted(10, 22) Source(27, 22) + SourceIndex(0) +7 >Emitted(10, 23) Source(27, 23) + SourceIndex(0) +8 >Emitted(10, 24) Source(27, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(11, 1) Source(28, 1) + SourceIndex(0) +2 >Emitted(11, 2) Source(28, 2) + SourceIndex(0) +--- +>>>for (var nameA = getRobot().name, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > +7 > {name: nameA } = getRobot() +8 > , +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(12, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(12, 4) Source(29, 4) + SourceIndex(0) +3 >Emitted(12, 5) Source(29, 5) + SourceIndex(0) +4 >Emitted(12, 6) Source(29, 6) + SourceIndex(0) +5 >Emitted(12, 9) Source(29, 9) + SourceIndex(0) +6 >Emitted(12, 10) Source(29, 10) + SourceIndex(0) +7 >Emitted(12, 33) Source(29, 37) + SourceIndex(0) +8 >Emitted(12, 35) Source(29, 39) + SourceIndex(0) +9 >Emitted(12, 36) Source(29, 40) + SourceIndex(0) +10>Emitted(12, 39) Source(29, 43) + SourceIndex(0) +11>Emitted(12, 40) Source(29, 44) + SourceIndex(0) +12>Emitted(12, 42) Source(29, 46) + SourceIndex(0) +13>Emitted(12, 43) Source(29, 47) + SourceIndex(0) +14>Emitted(12, 46) Source(29, 50) + SourceIndex(0) +15>Emitted(12, 47) Source(29, 51) + SourceIndex(0) +16>Emitted(12, 49) Source(29, 53) + SourceIndex(0) +17>Emitted(12, 50) Source(29, 54) + SourceIndex(0) +18>Emitted(12, 52) Source(29, 56) + SourceIndex(0) +19>Emitted(12, 54) Source(29, 58) + SourceIndex(0) +20>Emitted(12, 55) Source(29, 59) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(13, 5) Source(30, 5) + SourceIndex(0) +2 >Emitted(13, 12) Source(30, 12) + SourceIndex(0) +3 >Emitted(13, 13) Source(30, 13) + SourceIndex(0) +4 >Emitted(13, 16) Source(30, 16) + SourceIndex(0) +5 >Emitted(13, 17) Source(30, 17) + SourceIndex(0) +6 >Emitted(13, 22) Source(30, 22) + SourceIndex(0) +7 >Emitted(13, 23) Source(30, 23) + SourceIndex(0) +8 >Emitted(13, 24) Source(30, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(14, 1) Source(31, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(31, 2) + SourceIndex(0) +--- +>>>for (var nameA = { name: "trimmer", skill: "trimming" }.name, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^ +11> ^ +12> ^^ +13> ^ +14> ^^^ +15> ^ +16> ^^ +17> ^ +18> ^^ +19> ^^ +20> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > +7 > {name: nameA } = { name: "trimmer", skill: "trimming" } +8 > , +9 > i +10> = +11> 0 +12> ; +13> i +14> < +15> 1 +16> ; +17> i +18> ++ +19> ) +20> { +1->Emitted(15, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(15, 4) Source(32, 4) + SourceIndex(0) +3 >Emitted(15, 5) Source(32, 5) + SourceIndex(0) +4 >Emitted(15, 6) Source(32, 6) + SourceIndex(0) +5 >Emitted(15, 9) Source(32, 9) + SourceIndex(0) +6 >Emitted(15, 10) Source(32, 10) + SourceIndex(0) +7 >Emitted(15, 61) Source(32, 72) + SourceIndex(0) +8 >Emitted(15, 63) Source(32, 74) + SourceIndex(0) +9 >Emitted(15, 64) Source(32, 75) + SourceIndex(0) +10>Emitted(15, 67) Source(32, 78) + SourceIndex(0) +11>Emitted(15, 68) Source(32, 79) + SourceIndex(0) +12>Emitted(15, 70) Source(32, 81) + SourceIndex(0) +13>Emitted(15, 71) Source(32, 82) + SourceIndex(0) +14>Emitted(15, 74) Source(32, 85) + SourceIndex(0) +15>Emitted(15, 75) Source(32, 86) + SourceIndex(0) +16>Emitted(15, 77) Source(32, 88) + SourceIndex(0) +17>Emitted(15, 78) Source(32, 89) + SourceIndex(0) +18>Emitted(15, 80) Source(32, 91) + SourceIndex(0) +19>Emitted(15, 82) Source(32, 93) + SourceIndex(0) +20>Emitted(15, 83) Source(32, 94) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +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 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(17, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(17, 2) Source(34, 2) + SourceIndex(0) +--- +>>>for (var _a = multiRobot.skills, primaryA = _a.primary, secondaryA = _a.secondary, i = 0; i < 1; i++) { +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 >for +3 > +4 > ( +5 > let +6 > { +7 > skills +8 > : { +9 > primary: primaryA +10> , +11> secondary: secondaryA +12> } } = multiRobot, +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +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, 6) + SourceIndex(0) +5 >Emitted(18, 9) Source(35, 9) + SourceIndex(0) +6 >Emitted(18, 10) Source(35, 12) + SourceIndex(0) +7 >Emitted(18, 32) Source(35, 18) + SourceIndex(0) +8 >Emitted(18, 34) Source(35, 22) + SourceIndex(0) +9 >Emitted(18, 55) Source(35, 39) + SourceIndex(0) +10>Emitted(18, 57) Source(35, 41) + SourceIndex(0) +11>Emitted(18, 82) Source(35, 62) + SourceIndex(0) +12>Emitted(18, 84) Source(35, 81) + SourceIndex(0) +13>Emitted(18, 85) Source(35, 82) + SourceIndex(0) +14>Emitted(18, 88) Source(35, 85) + SourceIndex(0) +15>Emitted(18, 89) Source(35, 86) + SourceIndex(0) +16>Emitted(18, 91) Source(35, 88) + SourceIndex(0) +17>Emitted(18, 92) Source(35, 89) + SourceIndex(0) +18>Emitted(18, 95) Source(35, 92) + SourceIndex(0) +19>Emitted(18, 96) Source(35, 93) + SourceIndex(0) +20>Emitted(18, 98) Source(35, 95) + SourceIndex(0) +21>Emitted(18, 99) Source(35, 96) + SourceIndex(0) +22>Emitted(18, 101) Source(35, 98) + SourceIndex(0) +23>Emitted(18, 103) Source(35, 100) + SourceIndex(0) +24>Emitted(18, 104) Source(35, 101) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(19, 5) Source(36, 5) + SourceIndex(0) +2 >Emitted(19, 12) Source(36, 12) + SourceIndex(0) +3 >Emitted(19, 13) Source(36, 13) + SourceIndex(0) +4 >Emitted(19, 16) Source(36, 16) + SourceIndex(0) +5 >Emitted(19, 17) Source(36, 17) + SourceIndex(0) +6 >Emitted(19, 25) Source(36, 25) + SourceIndex(0) +7 >Emitted(19, 26) Source(36, 26) + SourceIndex(0) +8 >Emitted(19, 27) Source(36, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(20, 1) Source(37, 1) + SourceIndex(0) +2 >Emitted(20, 2) Source(37, 2) + SourceIndex(0) +--- +>>>for (var _b = getMultiRobot().skills, primaryA = _b.primary, secondaryA = _b.secondary, i = 0; i < 1; i++) { +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 >for +3 > +4 > ( +5 > let +6 > { +7 > skills +8 > : { +9 > primary: primaryA +10> , +11> secondary: secondaryA +12> } } = getMultiRobot(), +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(21, 1) Source(38, 1) + SourceIndex(0) +2 >Emitted(21, 4) Source(38, 4) + SourceIndex(0) +3 >Emitted(21, 5) Source(38, 5) + SourceIndex(0) +4 >Emitted(21, 6) Source(38, 6) + SourceIndex(0) +5 >Emitted(21, 9) Source(38, 9) + SourceIndex(0) +6 >Emitted(21, 10) Source(38, 12) + SourceIndex(0) +7 >Emitted(21, 37) Source(38, 18) + SourceIndex(0) +8 >Emitted(21, 39) Source(38, 22) + SourceIndex(0) +9 >Emitted(21, 60) Source(38, 39) + SourceIndex(0) +10>Emitted(21, 62) Source(38, 41) + SourceIndex(0) +11>Emitted(21, 87) Source(38, 62) + SourceIndex(0) +12>Emitted(21, 89) Source(38, 86) + SourceIndex(0) +13>Emitted(21, 90) Source(38, 87) + SourceIndex(0) +14>Emitted(21, 93) Source(38, 90) + SourceIndex(0) +15>Emitted(21, 94) Source(38, 91) + SourceIndex(0) +16>Emitted(21, 96) Source(38, 93) + SourceIndex(0) +17>Emitted(21, 97) Source(38, 94) + SourceIndex(0) +18>Emitted(21, 100) Source(38, 97) + SourceIndex(0) +19>Emitted(21, 101) Source(38, 98) + SourceIndex(0) +20>Emitted(21, 103) Source(38, 100) + SourceIndex(0) +21>Emitted(21, 104) Source(38, 101) + SourceIndex(0) +22>Emitted(21, 106) Source(38, 103) + SourceIndex(0) +23>Emitted(21, 108) Source(38, 105) + SourceIndex(0) +24>Emitted(21, 109) Source(38, 106) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(22, 5) Source(39, 5) + SourceIndex(0) +2 >Emitted(22, 12) Source(39, 12) + SourceIndex(0) +3 >Emitted(22, 13) Source(39, 13) + SourceIndex(0) +4 >Emitted(22, 16) Source(39, 16) + SourceIndex(0) +5 >Emitted(22, 17) Source(39, 17) + SourceIndex(0) +6 >Emitted(22, 25) Source(39, 25) + SourceIndex(0) +7 >Emitted(22, 26) Source(39, 26) + SourceIndex(0) +8 >Emitted(22, 27) Source(39, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(23, 1) Source(40, 1) + SourceIndex(0) +2 >Emitted(23, 2) Source(40, 2) + SourceIndex(0) +--- +>>>for (var _c = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }.skills, primaryA = _c.primary, secondaryA = _c.secondary, i = 0; i < 1; i++) { +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 >for +3 > +4 > ( +5 > let +6 > { +7 > skills +8 > : { +9 > primary: primaryA +10> , +11> secondary: secondaryA +12> } } = + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + > +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(24, 1) Source(41, 1) + SourceIndex(0) +2 >Emitted(24, 4) Source(41, 4) + SourceIndex(0) +3 >Emitted(24, 5) Source(41, 5) + SourceIndex(0) +4 >Emitted(24, 6) Source(41, 6) + SourceIndex(0) +5 >Emitted(24, 9) Source(41, 9) + SourceIndex(0) +6 >Emitted(24, 10) Source(41, 12) + SourceIndex(0) +7 >Emitted(24, 95) Source(41, 18) + SourceIndex(0) +8 >Emitted(24, 97) Source(41, 22) + SourceIndex(0) +9 >Emitted(24, 118) Source(41, 39) + SourceIndex(0) +10>Emitted(24, 120) Source(41, 41) + SourceIndex(0) +11>Emitted(24, 145) Source(41, 62) + SourceIndex(0) +12>Emitted(24, 147) Source(43, 5) + SourceIndex(0) +13>Emitted(24, 148) Source(43, 6) + SourceIndex(0) +14>Emitted(24, 151) Source(43, 9) + SourceIndex(0) +15>Emitted(24, 152) Source(43, 10) + SourceIndex(0) +16>Emitted(24, 154) Source(43, 12) + SourceIndex(0) +17>Emitted(24, 155) Source(43, 13) + SourceIndex(0) +18>Emitted(24, 158) Source(43, 16) + SourceIndex(0) +19>Emitted(24, 159) Source(43, 17) + SourceIndex(0) +20>Emitted(24, 161) Source(43, 19) + SourceIndex(0) +21>Emitted(24, 162) Source(43, 20) + SourceIndex(0) +22>Emitted(24, 164) Source(43, 22) + SourceIndex(0) +23>Emitted(24, 166) Source(43, 24) + SourceIndex(0) +24>Emitted(24, 167) Source(43, 25) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(25, 5) Source(44, 5) + SourceIndex(0) +2 >Emitted(25, 12) Source(44, 12) + SourceIndex(0) +3 >Emitted(25, 13) Source(44, 13) + SourceIndex(0) +4 >Emitted(25, 16) Source(44, 16) + SourceIndex(0) +5 >Emitted(25, 17) Source(44, 17) + SourceIndex(0) +6 >Emitted(25, 25) Source(44, 25) + SourceIndex(0) +7 >Emitted(25, 26) Source(44, 26) + SourceIndex(0) +8 >Emitted(25, 27) Source(44, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(26, 1) Source(45, 1) + SourceIndex(0) +2 >Emitted(26, 2) Source(45, 2) + SourceIndex(0) +--- +>>>for (var nameA = robot.name, skillA = robot.skill, i = 0; i < 1; i++) { +1-> +2 >^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^^^^^^^^^^^^^^^^^^^^ +10> ^^ +11> ^ +12> ^^^ +13> ^ +14> ^^ +15> ^ +16> ^^^ +17> ^ +18> ^^ +19> ^ +20> ^^ +21> ^^ +22> ^ +1-> + > + > +2 >for +3 > +4 > ( +5 > let +6 > { +7 > name: nameA +8 > , +9 > skill: skillA +10> } = robot, +11> i +12> = +13> 0 +14> ; +15> i +16> < +17> 1 +18> ; +19> i +20> ++ +21> ) +22> { +1->Emitted(27, 1) Source(47, 1) + SourceIndex(0) +2 >Emitted(27, 4) Source(47, 4) + SourceIndex(0) +3 >Emitted(27, 5) Source(47, 5) + SourceIndex(0) +4 >Emitted(27, 6) Source(47, 6) + SourceIndex(0) +5 >Emitted(27, 9) Source(47, 9) + SourceIndex(0) +6 >Emitted(27, 10) Source(47, 11) + SourceIndex(0) +7 >Emitted(27, 28) Source(47, 22) + SourceIndex(0) +8 >Emitted(27, 30) Source(47, 24) + SourceIndex(0) +9 >Emitted(27, 50) Source(47, 37) + SourceIndex(0) +10>Emitted(27, 52) Source(47, 49) + SourceIndex(0) +11>Emitted(27, 53) Source(47, 50) + SourceIndex(0) +12>Emitted(27, 56) Source(47, 53) + SourceIndex(0) +13>Emitted(27, 57) Source(47, 54) + SourceIndex(0) +14>Emitted(27, 59) Source(47, 56) + SourceIndex(0) +15>Emitted(27, 60) Source(47, 57) + SourceIndex(0) +16>Emitted(27, 63) Source(47, 60) + SourceIndex(0) +17>Emitted(27, 64) Source(47, 61) + SourceIndex(0) +18>Emitted(27, 66) Source(47, 63) + SourceIndex(0) +19>Emitted(27, 67) Source(47, 64) + SourceIndex(0) +20>Emitted(27, 69) Source(47, 66) + SourceIndex(0) +21>Emitted(27, 71) Source(47, 68) + SourceIndex(0) +22>Emitted(27, 72) Source(47, 69) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(28, 5) Source(48, 5) + SourceIndex(0) +2 >Emitted(28, 12) Source(48, 12) + SourceIndex(0) +3 >Emitted(28, 13) Source(48, 13) + SourceIndex(0) +4 >Emitted(28, 16) Source(48, 16) + SourceIndex(0) +5 >Emitted(28, 17) Source(48, 17) + SourceIndex(0) +6 >Emitted(28, 22) Source(48, 22) + SourceIndex(0) +7 >Emitted(28, 23) Source(48, 23) + SourceIndex(0) +8 >Emitted(28, 24) Source(48, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(29, 1) Source(49, 1) + SourceIndex(0) +2 >Emitted(29, 2) Source(49, 2) + SourceIndex(0) +--- +>>>for (var _d = getRobot(), nameA = _d.name, skillA = _d.skill, i = 0; i < 1; i++) { +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 >for +3 > +4 > ( +5 > let +6 > {name: nameA, skill: skillA } = +7 > getRobot() +8 > +9 > name: nameA +10> , +11> skill: skillA +12> } = getRobot(), +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(30, 1) Source(50, 1) + SourceIndex(0) +2 >Emitted(30, 4) Source(50, 4) + SourceIndex(0) +3 >Emitted(30, 5) Source(50, 5) + SourceIndex(0) +4 >Emitted(30, 6) Source(50, 6) + SourceIndex(0) +5 >Emitted(30, 9) Source(50, 9) + SourceIndex(0) +6 >Emitted(30, 10) Source(50, 42) + SourceIndex(0) +7 >Emitted(30, 25) Source(50, 52) + SourceIndex(0) +8 >Emitted(30, 27) Source(50, 11) + SourceIndex(0) +9 >Emitted(30, 42) Source(50, 22) + SourceIndex(0) +10>Emitted(30, 44) Source(50, 24) + SourceIndex(0) +11>Emitted(30, 61) Source(50, 37) + SourceIndex(0) +12>Emitted(30, 63) Source(50, 54) + SourceIndex(0) +13>Emitted(30, 64) Source(50, 55) + SourceIndex(0) +14>Emitted(30, 67) Source(50, 58) + SourceIndex(0) +15>Emitted(30, 68) Source(50, 59) + SourceIndex(0) +16>Emitted(30, 70) Source(50, 61) + SourceIndex(0) +17>Emitted(30, 71) Source(50, 62) + SourceIndex(0) +18>Emitted(30, 74) Source(50, 65) + SourceIndex(0) +19>Emitted(30, 75) Source(50, 66) + SourceIndex(0) +20>Emitted(30, 77) Source(50, 68) + SourceIndex(0) +21>Emitted(30, 78) Source(50, 69) + SourceIndex(0) +22>Emitted(30, 80) Source(50, 71) + SourceIndex(0) +23>Emitted(30, 82) Source(50, 73) + SourceIndex(0) +24>Emitted(30, 83) Source(50, 74) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(31, 5) Source(51, 5) + SourceIndex(0) +2 >Emitted(31, 12) Source(51, 12) + SourceIndex(0) +3 >Emitted(31, 13) Source(51, 13) + SourceIndex(0) +4 >Emitted(31, 16) Source(51, 16) + SourceIndex(0) +5 >Emitted(31, 17) Source(51, 17) + SourceIndex(0) +6 >Emitted(31, 22) Source(51, 22) + SourceIndex(0) +7 >Emitted(31, 23) Source(51, 23) + SourceIndex(0) +8 >Emitted(31, 24) Source(51, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(32, 1) Source(52, 1) + SourceIndex(0) +2 >Emitted(32, 2) Source(52, 2) + SourceIndex(0) +--- +>>>for (var _e = { name: "trimmer", skill: "trimming" }, nameA = _e.name, skillA = _e.skill, i = 0; i < 1; i++) { +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 >for +3 > +4 > ( +5 > let +6 > {name: nameA, skill: skillA } = +7 > { name: "trimmer", skill: "trimming" } +8 > +9 > name: nameA +10> , +11> skill: skillA +12> } = { name: "trimmer", skill: "trimming" }, +13> i +14> = +15> 0 +16> ; +17> i +18> < +19> 1 +20> ; +21> i +22> ++ +23> ) +24> { +1->Emitted(33, 1) Source(53, 1) + SourceIndex(0) +2 >Emitted(33, 4) Source(53, 4) + SourceIndex(0) +3 >Emitted(33, 5) Source(53, 5) + SourceIndex(0) +4 >Emitted(33, 6) Source(53, 6) + SourceIndex(0) +5 >Emitted(33, 9) Source(53, 9) + SourceIndex(0) +6 >Emitted(33, 10) Source(53, 42) + SourceIndex(0) +7 >Emitted(33, 53) Source(53, 87) + SourceIndex(0) +8 >Emitted(33, 55) Source(53, 11) + SourceIndex(0) +9 >Emitted(33, 70) Source(53, 22) + SourceIndex(0) +10>Emitted(33, 72) Source(53, 24) + SourceIndex(0) +11>Emitted(33, 89) Source(53, 37) + SourceIndex(0) +12>Emitted(33, 91) Source(53, 89) + SourceIndex(0) +13>Emitted(33, 92) Source(53, 90) + SourceIndex(0) +14>Emitted(33, 95) Source(53, 93) + SourceIndex(0) +15>Emitted(33, 96) Source(53, 94) + SourceIndex(0) +16>Emitted(33, 98) Source(53, 96) + SourceIndex(0) +17>Emitted(33, 99) Source(53, 97) + SourceIndex(0) +18>Emitted(33, 102) Source(53, 100) + SourceIndex(0) +19>Emitted(33, 103) Source(53, 101) + SourceIndex(0) +20>Emitted(33, 105) Source(53, 103) + SourceIndex(0) +21>Emitted(33, 106) Source(53, 104) + SourceIndex(0) +22>Emitted(33, 108) Source(53, 106) + SourceIndex(0) +23>Emitted(33, 110) Source(53, 108) + SourceIndex(0) +24>Emitted(33, 111) Source(53, 109) + SourceIndex(0) +--- +>>> console.log(nameA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > nameA +7 > ) +8 > ; +1 >Emitted(34, 5) Source(54, 5) + SourceIndex(0) +2 >Emitted(34, 12) Source(54, 12) + SourceIndex(0) +3 >Emitted(34, 13) Source(54, 13) + SourceIndex(0) +4 >Emitted(34, 16) Source(54, 16) + SourceIndex(0) +5 >Emitted(34, 17) Source(54, 17) + SourceIndex(0) +6 >Emitted(34, 22) Source(54, 22) + SourceIndex(0) +7 >Emitted(34, 23) Source(54, 23) + SourceIndex(0) +8 >Emitted(34, 24) Source(54, 24) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(35, 1) Source(55, 1) + SourceIndex(0) +2 >Emitted(35, 2) Source(55, 2) + SourceIndex(0) +--- +>>>for (var nameA = multiRobot.name, _f = multiRobot.skills, primaryA = _f.primary, secondaryA = _f.secondary, i = 0; i < 1; i++) { +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-> + > +2 >for +3 > +4 > ( +5 > let +6 > { +7 > name: nameA +8 > , +9 > skills +10> : { +11> primary: primaryA +12> , +13> secondary: secondaryA +14> } } = multiRobot, +15> i +16> = +17> 0 +18> ; +19> i +20> < +21> 1 +22> ; +23> i +24> ++ +25> ) +26> { +1->Emitted(36, 1) Source(56, 1) + SourceIndex(0) +2 >Emitted(36, 4) Source(56, 4) + SourceIndex(0) +3 >Emitted(36, 5) Source(56, 5) + SourceIndex(0) +4 >Emitted(36, 6) Source(56, 6) + SourceIndex(0) +5 >Emitted(36, 9) Source(56, 9) + SourceIndex(0) +6 >Emitted(36, 10) Source(56, 11) + SourceIndex(0) +7 >Emitted(36, 33) Source(56, 22) + SourceIndex(0) +8 >Emitted(36, 35) Source(56, 24) + SourceIndex(0) +9 >Emitted(36, 57) Source(56, 30) + SourceIndex(0) +10>Emitted(36, 59) Source(56, 34) + SourceIndex(0) +11>Emitted(36, 80) Source(56, 51) + SourceIndex(0) +12>Emitted(36, 82) Source(56, 53) + SourceIndex(0) +13>Emitted(36, 107) Source(56, 74) + SourceIndex(0) +14>Emitted(36, 109) Source(56, 93) + SourceIndex(0) +15>Emitted(36, 110) Source(56, 94) + SourceIndex(0) +16>Emitted(36, 113) Source(56, 97) + SourceIndex(0) +17>Emitted(36, 114) Source(56, 98) + SourceIndex(0) +18>Emitted(36, 116) Source(56, 100) + SourceIndex(0) +19>Emitted(36, 117) Source(56, 101) + SourceIndex(0) +20>Emitted(36, 120) Source(56, 104) + SourceIndex(0) +21>Emitted(36, 121) Source(56, 105) + SourceIndex(0) +22>Emitted(36, 123) Source(56, 107) + SourceIndex(0) +23>Emitted(36, 124) Source(56, 108) + SourceIndex(0) +24>Emitted(36, 126) Source(56, 110) + SourceIndex(0) +25>Emitted(36, 128) Source(56, 112) + SourceIndex(0) +26>Emitted(36, 129) Source(56, 113) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(37, 5) Source(57, 5) + SourceIndex(0) +2 >Emitted(37, 12) Source(57, 12) + SourceIndex(0) +3 >Emitted(37, 13) Source(57, 13) + SourceIndex(0) +4 >Emitted(37, 16) Source(57, 16) + SourceIndex(0) +5 >Emitted(37, 17) Source(57, 17) + SourceIndex(0) +6 >Emitted(37, 25) Source(57, 25) + SourceIndex(0) +7 >Emitted(37, 26) Source(57, 26) + SourceIndex(0) +8 >Emitted(37, 27) Source(57, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(38, 1) Source(58, 1) + SourceIndex(0) +2 >Emitted(38, 2) Source(58, 2) + SourceIndex(0) +--- +>>>for (var _g = getMultiRobot(), nameA = _g.name, _h = _g.skills, primaryA = _h.primary, secondaryA = _h.secondary, i = 0; i < 1; i++) { +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> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = +7 > getMultiRobot() +8 > +9 > name: nameA +10> , +11> skills +12> : { +13> primary: primaryA +14> , +15> secondary: secondaryA +16> } } = getMultiRobot(), +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(39, 1) Source(59, 1) + SourceIndex(0) +2 >Emitted(39, 4) Source(59, 4) + SourceIndex(0) +3 >Emitted(39, 5) Source(59, 5) + SourceIndex(0) +4 >Emitted(39, 6) Source(59, 6) + SourceIndex(0) +5 >Emitted(39, 9) Source(59, 9) + SourceIndex(0) +6 >Emitted(39, 10) Source(59, 81) + SourceIndex(0) +7 >Emitted(39, 30) Source(59, 96) + SourceIndex(0) +8 >Emitted(39, 32) Source(59, 11) + SourceIndex(0) +9 >Emitted(39, 47) Source(59, 22) + SourceIndex(0) +10>Emitted(39, 49) Source(59, 24) + SourceIndex(0) +11>Emitted(39, 63) Source(59, 30) + SourceIndex(0) +12>Emitted(39, 65) Source(59, 34) + SourceIndex(0) +13>Emitted(39, 86) Source(59, 51) + SourceIndex(0) +14>Emitted(39, 88) Source(59, 53) + SourceIndex(0) +15>Emitted(39, 113) Source(59, 74) + SourceIndex(0) +16>Emitted(39, 115) Source(59, 98) + SourceIndex(0) +17>Emitted(39, 116) Source(59, 99) + SourceIndex(0) +18>Emitted(39, 119) Source(59, 102) + SourceIndex(0) +19>Emitted(39, 120) Source(59, 103) + SourceIndex(0) +20>Emitted(39, 122) Source(59, 105) + SourceIndex(0) +21>Emitted(39, 123) Source(59, 106) + SourceIndex(0) +22>Emitted(39, 126) Source(59, 109) + SourceIndex(0) +23>Emitted(39, 127) Source(59, 110) + SourceIndex(0) +24>Emitted(39, 129) Source(59, 112) + SourceIndex(0) +25>Emitted(39, 130) Source(59, 113) + SourceIndex(0) +26>Emitted(39, 132) Source(59, 115) + SourceIndex(0) +27>Emitted(39, 134) Source(59, 117) + SourceIndex(0) +28>Emitted(39, 135) Source(59, 118) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(40, 5) Source(60, 5) + SourceIndex(0) +2 >Emitted(40, 12) Source(60, 12) + SourceIndex(0) +3 >Emitted(40, 13) Source(60, 13) + SourceIndex(0) +4 >Emitted(40, 16) Source(60, 16) + SourceIndex(0) +5 >Emitted(40, 17) Source(60, 17) + SourceIndex(0) +6 >Emitted(40, 25) Source(60, 25) + SourceIndex(0) +7 >Emitted(40, 26) Source(60, 26) + SourceIndex(0) +8 >Emitted(40, 27) Source(60, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(41, 1) Source(61, 1) + SourceIndex(0) +2 >Emitted(41, 2) Source(61, 2) + SourceIndex(0) +--- +>>>for (var _j = { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, nameA = _j.name, _k = _j.skills, primaryA = _k.primary, secondaryA = _k.secondary, i = 0; i < 1; i++) { +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> ^ +1-> + > +2 >for +3 > +4 > ( +5 > let +6 > {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + > +7 > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } +8 > +9 > name: nameA +10> , +11> skills +12> : { +13> primary: primaryA +14> , +15> secondary: secondaryA +16> } } = + > { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + > +17> i +18> = +19> 0 +20> ; +21> i +22> < +23> 1 +24> ; +25> i +26> ++ +27> ) +28> { +1->Emitted(42, 1) Source(62, 1) + SourceIndex(0) +2 >Emitted(42, 4) Source(62, 4) + SourceIndex(0) +3 >Emitted(42, 5) Source(62, 5) + SourceIndex(0) +4 >Emitted(42, 6) Source(62, 6) + SourceIndex(0) +5 >Emitted(42, 9) Source(62, 9) + SourceIndex(0) +6 >Emitted(42, 10) Source(63, 5) + SourceIndex(0) +7 >Emitted(42, 88) Source(63, 90) + SourceIndex(0) +8 >Emitted(42, 90) Source(62, 11) + SourceIndex(0) +9 >Emitted(42, 105) Source(62, 22) + SourceIndex(0) +10>Emitted(42, 107) Source(62, 24) + SourceIndex(0) +11>Emitted(42, 121) Source(62, 30) + SourceIndex(0) +12>Emitted(42, 123) Source(62, 34) + SourceIndex(0) +13>Emitted(42, 144) Source(62, 51) + SourceIndex(0) +14>Emitted(42, 146) Source(62, 53) + SourceIndex(0) +15>Emitted(42, 171) Source(62, 74) + SourceIndex(0) +16>Emitted(42, 173) Source(64, 5) + SourceIndex(0) +17>Emitted(42, 174) Source(64, 6) + SourceIndex(0) +18>Emitted(42, 177) Source(64, 9) + SourceIndex(0) +19>Emitted(42, 178) Source(64, 10) + SourceIndex(0) +20>Emitted(42, 180) Source(64, 12) + SourceIndex(0) +21>Emitted(42, 181) Source(64, 13) + SourceIndex(0) +22>Emitted(42, 184) Source(64, 16) + SourceIndex(0) +23>Emitted(42, 185) Source(64, 17) + SourceIndex(0) +24>Emitted(42, 187) Source(64, 19) + SourceIndex(0) +25>Emitted(42, 188) Source(64, 20) + SourceIndex(0) +26>Emitted(42, 190) Source(64, 22) + SourceIndex(0) +27>Emitted(42, 192) Source(64, 24) + SourceIndex(0) +28>Emitted(42, 193) Source(64, 25) + SourceIndex(0) +--- +>>> console.log(primaryA); +1 >^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^ +7 > ^ +8 > ^ +1 > + > +2 > console +3 > . +4 > log +5 > ( +6 > primaryA +7 > ) +8 > ; +1 >Emitted(43, 5) Source(65, 5) + SourceIndex(0) +2 >Emitted(43, 12) Source(65, 12) + SourceIndex(0) +3 >Emitted(43, 13) Source(65, 13) + SourceIndex(0) +4 >Emitted(43, 16) Source(65, 16) + SourceIndex(0) +5 >Emitted(43, 17) Source(65, 17) + SourceIndex(0) +6 >Emitted(43, 25) Source(65, 25) + SourceIndex(0) +7 >Emitted(43, 26) Source(65, 26) + SourceIndex(0) +8 >Emitted(43, 27) Source(65, 27) + SourceIndex(0) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(44, 1) Source(66, 1) + SourceIndex(0) +2 >Emitted(44, 2) Source(66, 2) + SourceIndex(0) +--- +>>>//# sourceMappingURL=sourceMapValidationDestructuringForObjectBindingPattern.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.symbols b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.symbols new file mode 100644 index 00000000000..7037783e9a1 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.symbols @@ -0,0 +1,282 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern.ts === +declare var console: { +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) + + log(msg: any): void; +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>msg : Symbol(msg, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 1, 8)) +} +interface Robot { +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 2, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 3, 17)) + + skill: string; +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 4, 17)) +} + +interface MultiRobot { +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 6, 1)) + + name: string; +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 8, 22)) + + skills: { +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 9, 17)) + + primary: string; +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 10, 13)) + + secondary: string; +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 11, 24)) + + }; +} + +let robot: Robot = { name: "mower", skill: "mowing" }; +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 16, 3)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 16, 20)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 16, 35)) + +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 3)) +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 30)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 45)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 55)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 74)) + +function getRobot() { +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 97)) + + return robot; +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 16, 3)) +} +function getMultiRobot() { +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 20, 1)) + + return multiRobot; +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 3)) +} + +for (let {name: nameA } = robot, i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 25, 10)) +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 16, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 25, 32)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 25, 32)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 25, 32)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 25, 10)) +} +for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 28, 10)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 97)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 28, 37)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 28, 37)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 28, 37)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 28, 10)) +} +for (let {name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 31, 10)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 31, 34)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 31, 51)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 31, 72)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 31, 72)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 31, 72)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 31, 10)) +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 34, 20)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 34, 39)) +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 34, 79)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 34, 79)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 34, 79)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 34, 20)) +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 37, 20)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 37, 39)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 20, 1)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 37, 84)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 37, 84)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 37, 84)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 37, 20)) +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 40, 20)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 40, 39)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 41, 17)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 41, 34)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 41, 44)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 41, 65)) + + i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 41, 90)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 41, 90)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 41, 90)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 40, 20)) +} + +for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 46, 10)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 4, 17)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 46, 22)) +>robot : Symbol(robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 16, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 46, 47)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 46, 47)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 46, 47)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 46, 10)) +} +for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 49, 10)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 4, 17)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 49, 22)) +>getRobot : Symbol(getRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 97)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 49, 52)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 49, 52)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 49, 52)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 49, 10)) +} +for (let {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : Symbol(Robot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 3, 17)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 52, 10)) +>skill : Symbol(Robot.skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 4, 17)) +>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 52, 22)) +>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 2, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 52, 49)) +>skill : Symbol(skill, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 52, 66)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 52, 87)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 52, 87)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 52, 87)) + + console.log(nameA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 52, 10)) +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { +>name : Symbol(MultiRobot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 8, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 55, 10)) +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 55, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 55, 51)) +>multiRobot : Symbol(multiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 17, 3)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 55, 91)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 55, 91)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 55, 91)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 55, 32)) +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { +>name : Symbol(MultiRobot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 8, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 58, 10)) +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 58, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 58, 51)) +>getMultiRobot : Symbol(getMultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 20, 1)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 58, 96)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 58, 96)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 58, 96)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 58, 32)) +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = +>name : Symbol(MultiRobot.name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 8, 22)) +>nameA : Symbol(nameA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 61, 10)) +>skills : Symbol(MultiRobot.skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 9, 17)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 10, 13)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 61, 32)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 11, 24)) +>secondaryA : Symbol(secondaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 61, 51)) + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>MultiRobot : Symbol(MultiRobot, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 6, 1)) +>name : Symbol(name, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 62, 17)) +>skills : Symbol(skills, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 62, 34)) +>primary : Symbol(primary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 62, 44)) +>secondary : Symbol(secondary, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 62, 65)) + + i = 0; i < 1; i++) { +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 62, 90)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 62, 90)) +>i : Symbol(i, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 62, 90)) + + console.log(primaryA); +>console.log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>console : Symbol(console, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 11)) +>log : Symbol(log, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 0, 22)) +>primaryA : Symbol(primaryA, Decl(sourceMapValidationDestructuringForObjectBindingPattern.ts, 61, 32)) +} diff --git a/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.types b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.types new file mode 100644 index 00000000000..21a7122e564 --- /dev/null +++ b/tests/baselines/reference/sourceMapValidationDestructuringForObjectBindingPattern.types @@ -0,0 +1,374 @@ +=== tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern.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 robot: Robot = { name: "mower", skill: "mowing" }; +>robot : Robot +>Robot : Robot +>{ name: "mower", skill: "mowing" } : { name: string; skill: string; } +>name : string +>"mower" : string +>skill : string +>"mowing" : string + +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +>multiRobot : MultiRobot +>MultiRobot : MultiRobot +>{ 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 + +function getRobot() { +>getRobot : () => Robot + + return robot; +>robot : Robot +} +function getMultiRobot() { +>getMultiRobot : () => MultiRobot + + return multiRobot; +>multiRobot : MultiRobot +} + +for (let {name: nameA } = robot, i = 0; i < 1; i++) { +>name : any +>nameA : string +>robot : Robot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + 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 } = getRobot(), i = 0; i < 1; i++) { +>name : any +>nameA : string +>getRobot() : Robot +>getRobot : () => Robot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + 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 } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : any +>nameA : string +>{ name: "trimmer", skill: "trimming" } : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + 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 } } = multiRobot, i = 0; i < 1; i++) { +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>multiRobot : MultiRobot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + 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 } } = getMultiRobot(), i = 0; i < 1; i++) { +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>getMultiRobot() : MultiRobot +>getMultiRobot : () => MultiRobot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + 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 } } = +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>MultiRobot : MultiRobot +>{ 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 + + i = 0; i < 1; i++) { +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + 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 } = robot, i = 0; i < 1; i++) { +>name : any +>nameA : string +>skill : any +>skillA : string +>robot : Robot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + 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 } = getRobot(), i = 0; i < 1; i++) { +>name : any +>nameA : string +>skill : any +>skillA : string +>getRobot() : Robot +>getRobot : () => Robot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + 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 } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { +>name : any +>nameA : string +>skill : any +>skillA : string +>{ name: "trimmer", skill: "trimming" } : Robot +>Robot : Robot +>{ name: "trimmer", skill: "trimming" } : { name: string; skill: string; } +>name : string +>"trimmer" : string +>skill : string +>"trimming" : string +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + 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 } } = multiRobot, i = 0; i < 1; i++) { +>name : any +>nameA : string +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>multiRobot : MultiRobot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + 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, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { +>name : any +>nameA : string +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string +>getMultiRobot() : MultiRobot +>getMultiRobot : () => MultiRobot +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + 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, skills: { primary: primaryA, secondary: secondaryA } } = +>name : any +>nameA : string +>skills : any +>primary : any +>primaryA : string +>secondary : any +>secondaryA : string + + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, +>{ name: "trimmer", skills: { primary: "trimming", secondary: "edging" } } : MultiRobot +>MultiRobot : MultiRobot +>{ 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 + + i = 0; i < 1; i++) { +>i : number +>0 : number +>i < 1 : boolean +>i : number +>1 : number +>i++ : number +>i : number + + console.log(primaryA); +>console.log(primaryA) : void +>console.log : (msg: any) => void +>console : { log(msg: any): void; } +>log : (msg: any) => void +>primaryA : string +} diff --git a/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern.ts b/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern.ts new file mode 100644 index 00000000000..7d5471db324 --- /dev/null +++ b/tests/cases/compiler/sourceMapValidationDestructuringForObjectBindingPattern.ts @@ -0,0 +1,67 @@ +// @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 robot: Robot = { name: "mower", skill: "mowing" }; +let multiRobot: MultiRobot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +function getRobot() { + return robot; +} +function getMultiRobot() { + return multiRobot; +} + +for (let {name: nameA } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let { skills: { primary: primaryA, secondary: secondaryA } } = + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} + +for (let {name: nameA, skill: skillA } = robot, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA, skill: skillA } = getRobot(), i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA, skill: skillA } = { name: "trimmer", skill: "trimming" }, i = 0; i < 1; i++) { + console.log(nameA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = getMultiRobot(), i = 0; i < 1; i++) { + console.log(primaryA); +} +for (let {name: nameA, skills: { primary: primaryA, secondary: secondaryA } } = + { name: "trimmer", skills: { primary: "trimming", secondary: "edging" } }, + i = 0; i < 1; i++) { + console.log(primaryA); +} \ No newline at end of file