diff --git a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern.baseline new file mode 100644 index 00000000000..c0738652a8e --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern.baseline @@ -0,0 +1,196 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [number, string, string]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined +-------------------------------- +5 >var robotA: Robot = [1, "mower", "mowing"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (89 to 132) SpanInfo: {"start":89,"length":42} + >var robotA: Robot = [1, "mower", "mowing"] + >:=> (line 5, col 0) to (line 5, col 42) +-------------------------------- +6 >function foo1([, nameA]: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (133 to 146) SpanInfo: {"start":171,"length":18} + >console.log(nameA) + >:=> (line 7, col 4) to (line 7, col 22) +6 >function foo1([, nameA]: Robot) { + + ~~~~~~~~~ => Pos: (147 to 155) SpanInfo: {"start":150,"length":5} + >nameA + >:=> (line 6, col 17) to (line 6, col 22) +6 >function foo1([, nameA]: Robot) { + + ~~~~~~~~~~~ => Pos: (156 to 166) SpanInfo: {"start":171,"length":18} + >console.log(nameA) + >:=> (line 7, col 4) to (line 7, col 22) +-------------------------------- +7 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (167 to 190) SpanInfo: {"start":171,"length":18} + >console.log(nameA) + >:=> (line 7, col 4) to (line 7, col 22) +-------------------------------- +8 >} + + ~~ => Pos: (191 to 192) SpanInfo: {"start":191,"length":1} + >} + >:=> (line 8, col 0) to (line 8, col 1) +-------------------------------- +9 >function foo2([numberB]: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (193 to 206) SpanInfo: {"start":231,"length":20} + >console.log(numberB) + >:=> (line 10, col 4) to (line 10, col 24) +9 >function foo2([numberB]: Robot) { + + ~~~~~~~~~ => Pos: (207 to 215) SpanInfo: {"start":208,"length":7} + >numberB + >:=> (line 9, col 15) to (line 9, col 22) +9 >function foo2([numberB]: Robot) { + + ~~~~~~~~~~~ => Pos: (216 to 226) SpanInfo: {"start":231,"length":20} + >console.log(numberB) + >:=> (line 10, col 4) to (line 10, col 24) +-------------------------------- +10 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (227 to 252) SpanInfo: {"start":231,"length":20} + >console.log(numberB) + >:=> (line 10, col 4) to (line 10, col 24) +-------------------------------- +11 >} + + ~~ => Pos: (253 to 254) SpanInfo: {"start":253,"length":1} + >} + >:=> (line 11, col 0) to (line 11, col 1) +-------------------------------- +12 >function foo3([numberA2, nameA2, skillA2]: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (255 to 268) SpanInfo: {"start":311,"length":19} + >console.log(nameA2) + >:=> (line 13, col 4) to (line 13, col 23) +12 >function foo3([numberA2, nameA2, skillA2]: Robot) { + + ~~~~~~~~~~ => Pos: (269 to 278) SpanInfo: {"start":270,"length":8} + >numberA2 + >:=> (line 12, col 15) to (line 12, col 23) +12 >function foo3([numberA2, nameA2, skillA2]: Robot) { + + ~~~~~~~~ => Pos: (279 to 286) SpanInfo: {"start":280,"length":6} + >nameA2 + >:=> (line 12, col 25) to (line 12, col 31) +12 >function foo3([numberA2, nameA2, skillA2]: Robot) { + + ~~~~~~~~~ => Pos: (287 to 295) SpanInfo: {"start":288,"length":7} + >skillA2 + >:=> (line 12, col 33) to (line 12, col 40) +12 >function foo3([numberA2, nameA2, skillA2]: Robot) { + + ~~~~~~~~~~~=> Pos: (296 to 306) SpanInfo: {"start":311,"length":19} + >console.log(nameA2) + >:=> (line 13, col 4) to (line 13, col 23) +-------------------------------- +13 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (307 to 331) SpanInfo: {"start":311,"length":19} + >console.log(nameA2) + >:=> (line 13, col 4) to (line 13, col 23) +-------------------------------- +14 >} + + ~~ => Pos: (332 to 333) SpanInfo: {"start":332,"length":1} + >} + >:=> (line 14, col 0) to (line 14, col 1) +-------------------------------- +15 >function foo4([numberA3, ...robotAInfo]: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (334 to 347) SpanInfo: {"start":388,"length":23} + >console.log(robotAInfo) + >:=> (line 16, col 4) to (line 16, col 27) +15 >function foo4([numberA3, ...robotAInfo]: Robot) { + + ~~~~~~~~~~ => Pos: (348 to 357) SpanInfo: {"start":349,"length":8} + >numberA3 + >:=> (line 15, col 15) to (line 15, col 23) +15 >function foo4([numberA3, ...robotAInfo]: Robot) { + + ~~~~~~~~~~~~~~~ => Pos: (358 to 372) SpanInfo: {"start":359,"length":13} + >...robotAInfo + >:=> (line 15, col 25) to (line 15, col 38) +15 >function foo4([numberA3, ...robotAInfo]: Robot) { + + ~~~~~~~~~~~=> Pos: (373 to 383) SpanInfo: {"start":388,"length":23} + >console.log(robotAInfo) + >:=> (line 16, col 4) to (line 16, col 27) +-------------------------------- +16 > console.log(robotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (384 to 412) SpanInfo: {"start":388,"length":23} + >console.log(robotAInfo) + >:=> (line 16, col 4) to (line 16, col 27) +-------------------------------- +17 >} + + ~~ => Pos: (413 to 414) SpanInfo: {"start":413,"length":1} + >} + >:=> (line 17, col 0) to (line 17, col 1) +-------------------------------- +18 >foo1(robotA); + + ~~~~~~~~~~~~~~ => Pos: (415 to 428) SpanInfo: {"start":415,"length":12} + >foo1(robotA) + >:=> (line 18, col 0) to (line 18, col 12) +-------------------------------- +19 >foo1([2, "trimmer", "trimming"]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (429 to 462) SpanInfo: {"start":429,"length":32} + >foo1([2, "trimmer", "trimming"]) + >:=> (line 19, col 0) to (line 19, col 32) +-------------------------------- +20 >foo2(robotA); + + ~~~~~~~~~~~~~~ => Pos: (463 to 476) SpanInfo: {"start":463,"length":12} + >foo2(robotA) + >:=> (line 20, col 0) to (line 20, col 12) +-------------------------------- +21 >foo2([2, "trimmer", "trimming"]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (477 to 510) SpanInfo: {"start":477,"length":32} + >foo2([2, "trimmer", "trimming"]) + >:=> (line 21, col 0) to (line 21, col 32) +-------------------------------- +22 >foo3(robotA); + + ~~~~~~~~~~~~~~ => Pos: (511 to 524) SpanInfo: {"start":511,"length":12} + >foo3(robotA) + >:=> (line 22, col 0) to (line 22, col 12) +-------------------------------- +23 >foo3([2, "trimmer", "trimming"]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (525 to 558) SpanInfo: {"start":525,"length":32} + >foo3([2, "trimmer", "trimming"]) + >:=> (line 23, col 0) to (line 23, col 32) +-------------------------------- +24 >foo4(robotA); + + ~~~~~~~~~~~~~~ => Pos: (559 to 572) SpanInfo: {"start":559,"length":12} + >foo4(robotA) + >:=> (line 24, col 0) to (line 24, col 12) +-------------------------------- +25 >foo4([2, "trimmer", "trimming"]); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (573 to 605) SpanInfo: {"start":573,"length":32} + >foo4([2, "trimmer", "trimming"]) + >:=> (line 25, col 0) to (line 25, col 32) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern2.baseline b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern2.baseline new file mode 100644 index 00000000000..254e3a16bb0 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern2.baseline @@ -0,0 +1,196 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [string, [string, string]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 90) SpanInfo: undefined +-------------------------------- +5 >var robotA: Robot = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (91 to 147) SpanInfo: {"start":91,"length":55} + >var robotA: Robot = ["trimmer", ["trimming", "edging"]] + >:=> (line 5, col 0) to (line 5, col 55) +-------------------------------- +6 >function foo1([, skillA]: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (148 to 161) SpanInfo: {"start":187,"length":19} + >console.log(skillA) + >:=> (line 7, col 4) to (line 7, col 23) +6 >function foo1([, skillA]: Robot) { + + ~~~~~~~~~~ => Pos: (162 to 171) SpanInfo: {"start":165,"length":6} + >skillA + >:=> (line 6, col 17) to (line 6, col 23) +6 >function foo1([, skillA]: Robot) { + + ~~~~~~~~~~~ => Pos: (172 to 182) SpanInfo: {"start":187,"length":19} + >console.log(skillA) + >:=> (line 7, col 4) to (line 7, col 23) +-------------------------------- +7 > console.log(skillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (183 to 207) SpanInfo: {"start":187,"length":19} + >console.log(skillA) + >:=> (line 7, col 4) to (line 7, col 23) +-------------------------------- +8 >} + + ~~ => Pos: (208 to 209) SpanInfo: {"start":208,"length":1} + >} + >:=> (line 8, col 0) to (line 8, col 1) +-------------------------------- +9 >function foo2([nameMB]: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (210 to 223) SpanInfo: {"start":247,"length":19} + >console.log(nameMB) + >:=> (line 10, col 4) to (line 10, col 23) +9 >function foo2([nameMB]: Robot) { + + ~~~~~~~~ => Pos: (224 to 231) SpanInfo: {"start":225,"length":6} + >nameMB + >:=> (line 9, col 15) to (line 9, col 21) +9 >function foo2([nameMB]: Robot) { + + ~~~~~~~~~~~ => Pos: (232 to 242) SpanInfo: {"start":247,"length":19} + >console.log(nameMB) + >:=> (line 10, col 4) to (line 10, col 23) +-------------------------------- +10 > console.log(nameMB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (243 to 267) SpanInfo: {"start":247,"length":19} + >console.log(nameMB) + >:=> (line 10, col 4) to (line 10, col 23) +-------------------------------- +11 >} + + ~~ => Pos: (268 to 269) SpanInfo: {"start":268,"length":1} + >} + >:=> (line 11, col 0) to (line 11, col 1) +-------------------------------- +12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (270 to 283) SpanInfo: {"start":341,"length":19} + >console.log(nameMA) + >:=> (line 13, col 4) to (line 13, col 23) +12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { + + ~~~~~~~~ => Pos: (284 to 291) SpanInfo: {"start":285,"length":6} + >nameMA + >:=> (line 12, col 15) to (line 12, col 21) +12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { + + ~~~~~~~~~~~~~~~~ => Pos: (292 to 307) SpanInfo: {"start":294,"length":13} + >primarySkillA + >:=> (line 12, col 24) to (line 12, col 37) +12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { + + ~~~~~~~~~~~~~~~~~=> Pos: (308 to 324) SpanInfo: {"start":309,"length":15} + >secondarySkillA + >:=> (line 12, col 39) to (line 12, col 54) +12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { + + ~=> Pos: (325 to 325) SpanInfo: {"start":293,"length":32} + >[primarySkillA, secondarySkillA] + >:=> (line 12, col 23) to (line 12, col 55) +12 >function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { + + ~~~~~~~~~~~=> Pos: (326 to 336) SpanInfo: {"start":341,"length":19} + >console.log(nameMA) + >:=> (line 13, col 4) to (line 13, col 23) +-------------------------------- +13 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (337 to 361) SpanInfo: {"start":341,"length":19} + >console.log(nameMA) + >:=> (line 13, col 4) to (line 13, col 23) +-------------------------------- +14 >} + + ~~ => Pos: (362 to 363) SpanInfo: {"start":362,"length":1} + >} + >:=> (line 14, col 0) to (line 14, col 1) +-------------------------------- +15 >function foo4([...multiRobotAInfo]: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (364 to 377) SpanInfo: {"start":413,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 16, col 4) to (line 16, col 32) +15 >function foo4([...multiRobotAInfo]: Robot) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (378 to 397) SpanInfo: {"start":379,"length":18} + >...multiRobotAInfo + >:=> (line 15, col 15) to (line 15, col 33) +15 >function foo4([...multiRobotAInfo]: Robot) { + + ~~~~~~~~~~~ => Pos: (398 to 408) SpanInfo: {"start":413,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 16, col 4) to (line 16, col 32) +-------------------------------- +16 > console.log(multiRobotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (409 to 442) SpanInfo: {"start":413,"length":28} + >console.log(multiRobotAInfo) + >:=> (line 16, col 4) to (line 16, col 32) +-------------------------------- +17 >} + + ~~ => Pos: (443 to 444) SpanInfo: {"start":443,"length":1} + >} + >:=> (line 17, col 0) to (line 17, col 1) +-------------------------------- +18 >foo1(robotA); + + ~~~~~~~~~~~~~~ => Pos: (445 to 458) SpanInfo: {"start":445,"length":12} + >foo1(robotA) + >:=> (line 18, col 0) to (line 18, col 12) +-------------------------------- +19 >foo1(["roomba", ["vaccum", "mopping"]]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (459 to 499) SpanInfo: {"start":459,"length":39} + >foo1(["roomba", ["vaccum", "mopping"]]) + >:=> (line 19, col 0) to (line 19, col 39) +-------------------------------- +20 >foo2(robotA); + + ~~~~~~~~~~~~~~ => Pos: (500 to 513) SpanInfo: {"start":500,"length":12} + >foo2(robotA) + >:=> (line 20, col 0) to (line 20, col 12) +-------------------------------- +21 >foo2(["roomba", ["vaccum", "mopping"]]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (514 to 554) SpanInfo: {"start":514,"length":39} + >foo2(["roomba", ["vaccum", "mopping"]]) + >:=> (line 21, col 0) to (line 21, col 39) +-------------------------------- +22 >foo3(robotA); + + ~~~~~~~~~~~~~~ => Pos: (555 to 568) SpanInfo: {"start":555,"length":12} + >foo3(robotA) + >:=> (line 22, col 0) to (line 22, col 12) +-------------------------------- +23 >foo3(["roomba", ["vaccum", "mopping"]]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (569 to 609) SpanInfo: {"start":569,"length":39} + >foo3(["roomba", ["vaccum", "mopping"]]) + >:=> (line 23, col 0) to (line 23, col 39) +-------------------------------- +24 >foo4(robotA); + + ~~~~~~~~~~~~~~ => Pos: (610 to 623) SpanInfo: {"start":610,"length":12} + >foo4(robotA) + >:=> (line 24, col 0) to (line 24, col 12) +-------------------------------- +25 >foo4(["roomba", ["vaccum", "mopping"]]); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (624 to 663) SpanInfo: {"start":624,"length":39} + >foo4(["roomba", ["vaccum", "mopping"]]) + >:=> (line 25, col 0) to (line 25, col 39) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues.baseline new file mode 100644 index 00000000000..4208b8de46b --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues.baseline @@ -0,0 +1,216 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [number, string, string]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined +-------------------------------- +5 >var robotA: Robot = [1, "mower", "mowing"]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (89 to 132) SpanInfo: {"start":89,"length":42} + >var robotA: Robot = [1, "mower", "mowing"] + >:=> (line 5, col 0) to (line 5, col 42) +-------------------------------- +6 >function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~ => Pos: (133 to 146) SpanInfo: {"start":206,"length":18} + >console.log(nameA) + >:=> (line 7, col 4) to (line 7, col 22) +6 >function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (147 to 166) SpanInfo: {"start":150,"length":16} + >nameA = "noName" + >:=> (line 6, col 17) to (line 6, col 33) +6 >function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (167 to 198) SpanInfo: {"start":147,"length":51} + >[, nameA = "noName"]: Robot = [-1, "name", "skill"] + >:=> (line 6, col 14) to (line 6, col 65) +6 >function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { + + ~~~=> Pos: (199 to 201) SpanInfo: {"start":206,"length":18} + >console.log(nameA) + >:=> (line 7, col 4) to (line 7, col 22) +-------------------------------- +7 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (202 to 225) SpanInfo: {"start":206,"length":18} + >console.log(nameA) + >:=> (line 7, col 4) to (line 7, col 22) +-------------------------------- +8 >} + + ~~ => Pos: (226 to 227) SpanInfo: {"start":226,"length":1} + >} + >:=> (line 8, col 0) to (line 8, col 1) +-------------------------------- +9 >function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~ => Pos: (228 to 241) SpanInfo: {"start":295,"length":20} + >console.log(numberB) + >:=> (line 10, col 4) to (line 10, col 24) +9 >function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~ => Pos: (242 to 255) SpanInfo: {"start":243,"length":12} + >numberB = -1 + >:=> (line 9, col 15) to (line 9, col 27) +9 >function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (256 to 287) SpanInfo: {"start":242,"length":45} + >[numberB = -1]: Robot = [-1, "name", "skill"] + >:=> (line 9, col 14) to (line 9, col 59) +9 >function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { + + ~~~=> Pos: (288 to 290) SpanInfo: {"start":295,"length":20} + >console.log(numberB) + >:=> (line 10, col 4) to (line 10, col 24) +-------------------------------- +10 > console.log(numberB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (291 to 316) SpanInfo: {"start":295,"length":20} + >console.log(numberB) + >:=> (line 10, col 4) to (line 10, col 24) +-------------------------------- +11 >} + + ~~ => Pos: (317 to 318) SpanInfo: {"start":317,"length":1} + >} + >:=> (line 11, col 0) to (line 11, col 1) +-------------------------------- +12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~ => Pos: (319 to 332) SpanInfo: {"start":423,"length":19} + >console.log(nameA2) + >:=> (line 13, col 4) to (line 13, col 23) +12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~ => Pos: (333 to 347) SpanInfo: {"start":334,"length":13} + >numberA2 = -1 + >:=> (line 12, col 15) to (line 12, col 28) +12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~~~=> Pos: (348 to 364) SpanInfo: {"start":349,"length":15} + >nameA2 = "name" + >:=> (line 12, col 30) to (line 12, col 45) +12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~~~~~=> Pos: (365 to 383) SpanInfo: {"start":366,"length":17} + >skillA2 = "skill" + >:=> (line 12, col 47) to (line 12, col 64) +12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (384 to 415) SpanInfo: {"start":333,"length":82} + >[numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"] + >:=> (line 12, col 14) to (line 12, col 96) +12 >function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { + + ~~~=> Pos: (416 to 418) SpanInfo: {"start":423,"length":19} + >console.log(nameA2) + >:=> (line 13, col 4) to (line 13, col 23) +-------------------------------- +13 > console.log(nameA2); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (419 to 443) SpanInfo: {"start":423,"length":19} + >console.log(nameA2) + >:=> (line 13, col 4) to (line 13, col 23) +-------------------------------- +14 >} + + ~~ => Pos: (444 to 445) SpanInfo: {"start":444,"length":1} + >} + >:=> (line 14, col 0) to (line 14, col 1) +-------------------------------- +15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~ => Pos: (446 to 459) SpanInfo: {"start":529,"length":23} + >console.log(robotAInfo) + >:=> (line 16, col 4) to (line 16, col 27) +15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~ => Pos: (460 to 474) SpanInfo: {"start":461,"length":13} + >numberA3 = -1 + >:=> (line 15, col 15) to (line 15, col 28) +15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~ => Pos: (475 to 489) SpanInfo: {"start":476,"length":13} + >...robotAInfo + >:=> (line 15, col 30) to (line 15, col 43) +15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (490 to 521) SpanInfo: {"start":460,"length":61} + >[numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"] + >:=> (line 15, col 14) to (line 15, col 75) +15 >function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { + + ~~~=> Pos: (522 to 524) SpanInfo: {"start":529,"length":23} + >console.log(robotAInfo) + >:=> (line 16, col 4) to (line 16, col 27) +-------------------------------- +16 > console.log(robotAInfo); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (525 to 553) SpanInfo: {"start":529,"length":23} + >console.log(robotAInfo) + >:=> (line 16, col 4) to (line 16, col 27) +-------------------------------- +17 >} + + ~~ => Pos: (554 to 555) SpanInfo: {"start":554,"length":1} + >} + >:=> (line 17, col 0) to (line 17, col 1) +-------------------------------- +18 >foo1(robotA); + + ~~~~~~~~~~~~~~ => Pos: (556 to 569) SpanInfo: {"start":556,"length":12} + >foo1(robotA) + >:=> (line 18, col 0) to (line 18, col 12) +-------------------------------- +19 >foo1([2, "trimmer", "trimming"]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (570 to 603) SpanInfo: {"start":570,"length":32} + >foo1([2, "trimmer", "trimming"]) + >:=> (line 19, col 0) to (line 19, col 32) +-------------------------------- +20 >foo2(robotA); + + ~~~~~~~~~~~~~~ => Pos: (604 to 617) SpanInfo: {"start":604,"length":12} + >foo2(robotA) + >:=> (line 20, col 0) to (line 20, col 12) +-------------------------------- +21 >foo2([2, "trimmer", "trimming"]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (618 to 651) SpanInfo: {"start":618,"length":32} + >foo2([2, "trimmer", "trimming"]) + >:=> (line 21, col 0) to (line 21, col 32) +-------------------------------- +22 >foo3(robotA); + + ~~~~~~~~~~~~~~ => Pos: (652 to 665) SpanInfo: {"start":652,"length":12} + >foo3(robotA) + >:=> (line 22, col 0) to (line 22, col 12) +-------------------------------- +23 >foo3([2, "trimmer", "trimming"]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (666 to 699) SpanInfo: {"start":666,"length":32} + >foo3([2, "trimmer", "trimming"]) + >:=> (line 23, col 0) to (line 23, col 32) +-------------------------------- +24 >foo4(robotA); + + ~~~~~~~~~~~~~~ => Pos: (700 to 713) SpanInfo: {"start":700,"length":12} + >foo4(robotA) + >:=> (line 24, col 0) to (line 24, col 12) +-------------------------------- +25 >foo4([2, "trimmer", "trimming"]); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (714 to 746) SpanInfo: {"start":714,"length":32} + >foo4([2, "trimmer", "trimming"]) + >:=> (line 25, col 0) to (line 25, col 32) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues2.baseline b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues2.baseline new file mode 100644 index 00000000000..b2c63f3b2be --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues2.baseline @@ -0,0 +1,182 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: any): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (48 to 49) SpanInfo: undefined +-------------------------------- +4 >type Robot = [string, string[]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 82) SpanInfo: undefined +-------------------------------- +5 >var robotA: Robot = ["trimmer", ["trimming", "edging"]]; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (83 to 139) SpanInfo: {"start":83,"length":55} + >var robotA: Robot = ["trimmer", ["trimming", "edging"]] + >:=> (line 5, col 0) to (line 5, col 55) +-------------------------------- +6 >function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { + + ~~~~~~~~~~~~~~ => Pos: (140 to 153) SpanInfo: {"start":236,"length":19} + >console.log(skillA) + >:=> (line 7, col 4) to (line 7, col 23) +6 >function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (154 to 188) SpanInfo: {"start":157,"length":31} + >skillA = ["noSkill", "noSkill"] + >:=> (line 6, col 17) to (line 6, col 48) +6 >function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (189 to 228) SpanInfo: {"start":154,"length":74} + >[, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]] + >:=> (line 6, col 14) to (line 6, col 88) +6 >function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { + + ~~~=> Pos: (229 to 231) SpanInfo: {"start":236,"length":19} + >console.log(skillA) + >:=> (line 7, col 4) to (line 7, col 23) +-------------------------------- +7 > console.log(skillA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (232 to 256) SpanInfo: {"start":236,"length":19} + >console.log(skillA) + >:=> (line 7, col 4) to (line 7, col 23) +-------------------------------- +8 >} + + ~~ => Pos: (257 to 258) SpanInfo: {"start":257,"length":1} + >} + >:=> (line 8, col 0) to (line 8, col 1) +-------------------------------- +9 >function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { + + ~~~~~~~~~~~~~~ => Pos: (259 to 272) SpanInfo: {"start":340,"length":19} + >console.log(nameMB) + >:=> (line 10, col 4) to (line 10, col 23) +9 >function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { + + ~~~~~~~~~~~~~~~~~~~ => Pos: (273 to 291) SpanInfo: {"start":274,"length":17} + >nameMB = "noName" + >:=> (line 9, col 15) to (line 9, col 32) +9 >function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (292 to 332) SpanInfo: {"start":273,"length":59} + >[nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]] + >:=> (line 9, col 14) to (line 9, col 73) +9 >function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { + + ~~~=> Pos: (333 to 335) SpanInfo: {"start":340,"length":19} + >console.log(nameMB) + >:=> (line 10, col 4) to (line 10, col 23) +-------------------------------- +10 > console.log(nameMB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (336 to 360) SpanInfo: {"start":340,"length":19} + >console.log(nameMB) + >:=> (line 10, col 4) to (line 10, col 23) +-------------------------------- +11 >} + + ~~ => Pos: (361 to 362) SpanInfo: {"start":361,"length":1} + >} + >:=> (line 11, col 0) to (line 11, col 1) +-------------------------------- +12 >function foo3([nameMA = "noName", [ + + ~~~~~~~~~~~~~~ => Pos: (363 to 376) SpanInfo: {"start":506,"length":19} + >console.log(nameMA) + >:=> (line 16, col 4) to (line 16, col 23) +12 >function foo3([nameMA = "noName", [ + + ~~~~~~~~~~~~~~~~~~~ => Pos: (377 to 395) SpanInfo: {"start":378,"length":17} + >nameMA = "noName" + >:=> (line 12, col 15) to (line 12, col 32) +12 >function foo3([nameMA = "noName", [ + + ~~~ => Pos: (396 to 398) SpanInfo: {"start":403,"length":25} + >primarySkillA = "primary" + >:=> (line 13, col 4) to (line 13, col 29) +-------------------------------- +13 > primarySkillA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (399 to 429) SpanInfo: {"start":403,"length":25} + >primarySkillA = "primary" + >:=> (line 13, col 4) to (line 13, col 29) +-------------------------------- +14 > secondarySkillA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (430 to 463) SpanInfo: {"start":434,"length":29} + >secondarySkillA = "secondary" + >:=> (line 14, col 4) to (line 14, col 33) +-------------------------------- +15 >] = ["noSkill", "noSkill"]]: Robot) { + + ~ => Pos: (464 to 464) SpanInfo: {"start":434,"length":29} + >secondarySkillA = "secondary" + >:=> (line 14, col 4) to (line 14, col 33) +15 >] = ["noSkill", "noSkill"]]: Robot) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (465 to 490) SpanInfo: {"start":397,"length":93} + >[ + > primarySkillA = "primary", + > secondarySkillA = "secondary" + >] = ["noSkill", "noSkill"] + >:=> (line 12, col 34) to (line 15, col 26) +15 >] = ["noSkill", "noSkill"]]: Robot) { + + ~~~~~~~~~~~ => Pos: (491 to 501) SpanInfo: {"start":506,"length":19} + >console.log(nameMA) + >:=> (line 16, col 4) to (line 16, col 23) +-------------------------------- +16 > console.log(nameMA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (502 to 526) SpanInfo: {"start":506,"length":19} + >console.log(nameMA) + >:=> (line 16, col 4) to (line 16, col 23) +-------------------------------- +17 >} + + ~~ => Pos: (527 to 528) SpanInfo: {"start":527,"length":1} + >} + >:=> (line 17, col 0) to (line 17, col 1) +-------------------------------- +18 >foo1(robotA); + + ~~~~~~~~~~~~~~ => Pos: (529 to 542) SpanInfo: {"start":529,"length":12} + >foo1(robotA) + >:=> (line 18, col 0) to (line 18, col 12) +-------------------------------- +19 >foo1(["roomba", ["vaccum", "mopping"]]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (543 to 583) SpanInfo: {"start":543,"length":39} + >foo1(["roomba", ["vaccum", "mopping"]]) + >:=> (line 19, col 0) to (line 19, col 39) +-------------------------------- +20 >foo2(robotA); + + ~~~~~~~~~~~~~~ => Pos: (584 to 597) SpanInfo: {"start":584,"length":12} + >foo2(robotA) + >:=> (line 20, col 0) to (line 20, col 12) +-------------------------------- +21 >foo2(["roomba", ["vaccum", "mopping"]]); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (598 to 638) SpanInfo: {"start":598,"length":39} + >foo2(["roomba", ["vaccum", "mopping"]]) + >:=> (line 21, col 0) to (line 21, col 39) +-------------------------------- +22 >foo3(robotA); + + ~~~~~~~~~~~~~~ => Pos: (639 to 652) SpanInfo: {"start":639,"length":12} + >foo3(robotA) + >:=> (line 22, col 0) to (line 22, col 12) +-------------------------------- +23 >foo3(["roomba", ["vaccum", "mopping"]]); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (653 to 692) SpanInfo: {"start":653,"length":39} + >foo3(["roomba", ["vaccum", "mopping"]]) + >:=> (line 23, col 0) to (line 23, col 39) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPattern.baseline new file mode 100644 index 00000000000..3c17d60d1a4 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPattern.baseline @@ -0,0 +1,200 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 50) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (51 to 52) SpanInfo: undefined +-------------------------------- +4 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (53 to 70) SpanInfo: undefined +-------------------------------- +5 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (71 to 88) SpanInfo: undefined +-------------------------------- +6 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (89 to 102) SpanInfo: undefined +-------------------------------- +7 > primary: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (103 to 127) SpanInfo: undefined +-------------------------------- +8 > secondary: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (128 to 154) SpanInfo: undefined +-------------------------------- +9 > }; + + ~~~~~~~ => Pos: (155 to 161) SpanInfo: undefined +-------------------------------- +10 >} + + ~~ => Pos: (162 to 163) SpanInfo: undefined +-------------------------------- +11 >var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (164 to 252) SpanInfo: {"start":164,"length":87} + >var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } } + >:=> (line 11, col 0) to (line 11, col 87) +-------------------------------- +12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (253 to 266) SpanInfo: {"start":338,"length":21} + >console.log(primaryA) + >:=> (line 13, col 4) to (line 13, col 25) +12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { + + ~~~~~~~~~ => Pos: (267 to 275) SpanInfo: {"start":269,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 12, col 16) to (line 12, col 68) +12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (276 to 296) SpanInfo: {"start":279,"length":17} + >primary: primaryA + >:=> (line 12, col 26) to (line 12, col 43) +12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (297 to 320) SpanInfo: {"start":298,"length":21} + >secondary: secondaryA + >:=> (line 12, col 45) to (line 12, col 66) +12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { + + ~~=> Pos: (321 to 322) SpanInfo: {"start":269,"length":52} + >skills: { primary: primaryA, secondary: secondaryA } + >:=> (line 12, col 16) to (line 12, col 68) +12 >function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { + + ~~~~~~~~~~~=> Pos: (323 to 333) SpanInfo: {"start":338,"length":21} + >console.log(primaryA) + >:=> (line 13, col 4) to (line 13, col 25) +-------------------------------- +13 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (334 to 360) SpanInfo: {"start":338,"length":21} + >console.log(primaryA) + >:=> (line 13, col 4) to (line 13, col 25) +-------------------------------- +14 >} + + ~~ => Pos: (361 to 362) SpanInfo: {"start":361,"length":1} + >} + >:=> (line 14, col 0) to (line 14, col 1) +-------------------------------- +15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (363 to 376) SpanInfo: {"start":461,"length":23} + >console.log(secondaryB) + >:=> (line 16, col 4) to (line 16, col 27) +15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (377 to 390) SpanInfo: {"start":379,"length":11} + >name: nameC + >:=> (line 15, col 16) to (line 15, col 27) +15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { + + ~~~~~~~~ => Pos: (391 to 398) SpanInfo: {"start":392,"length":52} + >skills: { primary: primaryB, secondary: secondaryB } + >:=> (line 15, col 29) to (line 15, col 81) +15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { + + ~~~~~~~~~~~~~~~~~~~~~=> Pos: (399 to 419) SpanInfo: {"start":402,"length":17} + >primary: primaryB + >:=> (line 15, col 39) to (line 15, col 56) +15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { + + ~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (420 to 443) SpanInfo: {"start":421,"length":21} + >secondary: secondaryB + >:=> (line 15, col 58) to (line 15, col 79) +15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { + + ~~=> Pos: (444 to 445) SpanInfo: {"start":392,"length":52} + >skills: { primary: primaryB, secondary: secondaryB } + >:=> (line 15, col 29) to (line 15, col 81) +15 >function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { + + ~~~~~~~~~~~=> Pos: (446 to 456) SpanInfo: {"start":461,"length":23} + >console.log(secondaryB) + >:=> (line 16, col 4) to (line 16, col 27) +-------------------------------- +16 > console.log(secondaryB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (457 to 485) SpanInfo: {"start":461,"length":23} + >console.log(secondaryB) + >:=> (line 16, col 4) to (line 16, col 27) +-------------------------------- +17 >} + + ~~ => Pos: (486 to 487) SpanInfo: {"start":486,"length":1} + >} + >:=> (line 17, col 0) to (line 17, col 1) +-------------------------------- +18 >function foo3({ skills }: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (488 to 501) SpanInfo: {"start":527,"length":27} + >console.log(skills.primary) + >:=> (line 19, col 4) to (line 19, col 31) +18 >function foo3({ skills }: Robot) { + + ~~~~~~~~~~ => Pos: (502 to 511) SpanInfo: {"start":504,"length":6} + >skills + >:=> (line 18, col 16) to (line 18, col 22) +18 >function foo3({ skills }: Robot) { + + ~~~~~~~~~~~ => Pos: (512 to 522) SpanInfo: {"start":527,"length":27} + >console.log(skills.primary) + >:=> (line 19, col 4) to (line 19, col 31) +-------------------------------- +19 > console.log(skills.primary); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (523 to 555) SpanInfo: {"start":527,"length":27} + >console.log(skills.primary) + >:=> (line 19, col 4) to (line 19, col 31) +-------------------------------- +20 >} + + ~~ => Pos: (556 to 557) SpanInfo: {"start":556,"length":1} + >} + >:=> (line 20, col 0) to (line 20, col 1) +-------------------------------- +21 >foo1(robotA); + + ~~~~~~~~~~~~~~ => Pos: (558 to 571) SpanInfo: {"start":558,"length":12} + >foo1(robotA) + >:=> (line 21, col 0) to (line 21, col 12) +-------------------------------- +22 >foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (572 to 657) SpanInfo: {"start":572,"length":84} + >foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) + >:=> (line 22, col 0) to (line 22, col 84) +-------------------------------- +23 >foo2(robotA); + + ~~~~~~~~~~~~~~ => Pos: (658 to 671) SpanInfo: {"start":658,"length":12} + >foo2(robotA) + >:=> (line 23, col 0) to (line 23, col 12) +-------------------------------- +24 >foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (672 to 757) SpanInfo: {"start":672,"length":84} + >foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) + >:=> (line 24, col 0) to (line 24, col 84) +-------------------------------- +25 >foo3(robotA); + + ~~~~~~~~~~~~~~ => Pos: (758 to 771) SpanInfo: {"start":758,"length":12} + >foo3(robotA) + >:=> (line 25, col 0) to (line 25, col 12) +-------------------------------- +26 >foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (772 to 856) SpanInfo: {"start":772,"length":84} + >foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) + >:=> (line 26, col 0) to (line 26, col 84) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline new file mode 100644 index 00000000000..9dd4b8dc5b1 --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline @@ -0,0 +1,300 @@ + +1 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined +-------------------------------- +2 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 50) SpanInfo: undefined +-------------------------------- +3 >} + + ~~ => Pos: (51 to 52) SpanInfo: undefined +-------------------------------- +4 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (53 to 70) SpanInfo: undefined +-------------------------------- +5 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (71 to 88) SpanInfo: undefined +-------------------------------- +6 > skills: { + + ~~~~~~~~~~~~~~ => Pos: (89 to 102) SpanInfo: undefined +-------------------------------- +7 > primary?: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (103 to 128) SpanInfo: undefined +-------------------------------- +8 > secondary?: string; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (129 to 156) SpanInfo: undefined +-------------------------------- +9 > }; + + ~~~~~~~ => Pos: (157 to 163) SpanInfo: undefined +-------------------------------- +10 >} + + ~~ => Pos: (164 to 165) SpanInfo: undefined +-------------------------------- +11 >var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (166 to 254) SpanInfo: {"start":166,"length":87} + >var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } } + >:=> (line 11, col 0) to (line 11, col 87) +-------------------------------- +12 >function foo1( + + ~~~~~~~~~~~~~~~ => Pos: (255 to 269) SpanInfo: {"start":475,"length":21} + >console.log(primaryA) + >:=> (line 19, col 4) to (line 19, col 25) +-------------------------------- +13 > { + + ~~~~~~ => Pos: (270 to 275) SpanInfo: {"start":284,"length":161} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + >:=> (line 14, col 8) to (line 17, col 60) +-------------------------------- +14 > skills: { + + ~~~~~~~~~~~~~~~ => Pos: (276 to 290) SpanInfo: {"start":284,"length":161} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + >:=> (line 14, col 8) to (line 17, col 60) +14 > skills: { + + ~~~ => Pos: (291 to 293) SpanInfo: {"start":306,"length":29} + >primary: primaryA = "primary" + >:=> (line 15, col 12) to (line 15, col 41) +-------------------------------- +15 > primary: primaryA = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (294 to 336) SpanInfo: {"start":306,"length":29} + >primary: primaryA = "primary" + >:=> (line 15, col 12) to (line 15, col 41) +-------------------------------- +16 > secondary: secondaryA = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (337 to 384) SpanInfo: {"start":349,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 16, col 12) to (line 16, col 47) +-------------------------------- +17 > } = { primary: "SomeSkill", secondary: "someSkill" } + + ~~~~~~~~~ => Pos: (385 to 393) SpanInfo: {"start":349,"length":35} + >secondary: secondaryA = "secondary" + >:=> (line 16, col 12) to (line 16, col 47) +17 > } = { primary: "SomeSkill", secondary: "someSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (394 to 445) SpanInfo: {"start":284,"length":161} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + >:=> (line 14, col 8) to (line 17, col 60) +-------------------------------- +18 > }: Robot = robotA) { + + ~~~~~ => Pos: (446 to 450) SpanInfo: {"start":284,"length":161} + >skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + >:=> (line 14, col 8) to (line 17, col 60) +18 > }: Robot = robotA) { + + ~~~~~~~~~~~~~~~~~ => Pos: (451 to 467) SpanInfo: {"start":274,"length":193} + >{ + > skills: { + > primary: primaryA = "primary", + > secondary: secondaryA = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + > }: Robot = robotA + >:=> (line 13, col 4) to (line 18, col 21) +18 > }: Robot = robotA) { + + ~~~ => Pos: (468 to 470) SpanInfo: {"start":475,"length":21} + >console.log(primaryA) + >:=> (line 19, col 4) to (line 19, col 25) +-------------------------------- +19 > console.log(primaryA); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (471 to 497) SpanInfo: {"start":475,"length":21} + >console.log(primaryA) + >:=> (line 19, col 4) to (line 19, col 25) +-------------------------------- +20 >} + + ~~ => Pos: (498 to 499) SpanInfo: {"start":498,"length":1} + >} + >:=> (line 20, col 0) to (line 20, col 1) +-------------------------------- +21 >function foo2( + + ~~~~~~~~~~~~~~~ => Pos: (500 to 514) SpanInfo: {"start":750,"length":23} + >console.log(secondaryB) + >:=> (line 29, col 4) to (line 29, col 27) +-------------------------------- +22 > { + + ~~~~~~ => Pos: (515 to 520) SpanInfo: {"start":529,"length":20} + >name: nameC = "name" + >:=> (line 23, col 8) to (line 23, col 28) +-------------------------------- +23 > name: nameC = "name", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (521 to 550) SpanInfo: {"start":529,"length":20} + >name: nameC = "name" + >:=> (line 23, col 8) to (line 23, col 28) +-------------------------------- +24 > skills: { + + ~~~~~~~~~~~~~~~ => Pos: (551 to 565) SpanInfo: {"start":559,"length":161} + >skills: { + > primary: primaryB = "primary", + > secondary: secondaryB = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + >:=> (line 24, col 8) to (line 27, col 60) +24 > skills: { + + ~~~ => Pos: (566 to 568) SpanInfo: {"start":581,"length":29} + >primary: primaryB = "primary" + >:=> (line 25, col 12) to (line 25, col 41) +-------------------------------- +25 > primary: primaryB = "primary", + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (569 to 611) SpanInfo: {"start":581,"length":29} + >primary: primaryB = "primary" + >:=> (line 25, col 12) to (line 25, col 41) +-------------------------------- +26 > secondary: secondaryB = "secondary" + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (612 to 659) SpanInfo: {"start":624,"length":35} + >secondary: secondaryB = "secondary" + >:=> (line 26, col 12) to (line 26, col 47) +-------------------------------- +27 > } = { primary: "SomeSkill", secondary: "someSkill" } + + ~~~~~~~~~ => Pos: (660 to 668) SpanInfo: {"start":624,"length":35} + >secondary: secondaryB = "secondary" + >:=> (line 26, col 12) to (line 26, col 47) +27 > } = { primary: "SomeSkill", secondary: "someSkill" } + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (669 to 720) SpanInfo: {"start":559,"length":161} + >skills: { + > primary: primaryB = "primary", + > secondary: secondaryB = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + >:=> (line 24, col 8) to (line 27, col 60) +-------------------------------- +28 > }: Robot = robotA) { + + ~~~~~ => Pos: (721 to 725) SpanInfo: {"start":559,"length":161} + >skills: { + > primary: primaryB = "primary", + > secondary: secondaryB = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + >:=> (line 24, col 8) to (line 27, col 60) +28 > }: Robot = robotA) { + + ~~~~~~~~~~~~~~~~~ => Pos: (726 to 742) SpanInfo: {"start":519,"length":223} + >{ + > name: nameC = "name", + > skills: { + > primary: primaryB = "primary", + > secondary: secondaryB = "secondary" + > } = { primary: "SomeSkill", secondary: "someSkill" } + > }: Robot = robotA + >:=> (line 22, col 4) to (line 28, col 21) +28 > }: Robot = robotA) { + + ~~~ => Pos: (743 to 745) SpanInfo: {"start":750,"length":23} + >console.log(secondaryB) + >:=> (line 29, col 4) to (line 29, col 27) +-------------------------------- +29 > console.log(secondaryB); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (746 to 774) SpanInfo: {"start":750,"length":23} + >console.log(secondaryB) + >:=> (line 29, col 4) to (line 29, col 27) +-------------------------------- +30 >} + + ~~ => Pos: (775 to 776) SpanInfo: {"start":775,"length":1} + >} + >:=> (line 30, col 0) to (line 30, col 1) +-------------------------------- +31 >function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { + + ~~~~~~~~~~~~~~ => Pos: (777 to 790) SpanInfo: {"start":877,"length":27} + >console.log(skills.primary) + >:=> (line 32, col 4) to (line 32, col 31) +31 >function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (791 to 852) SpanInfo: {"start":793,"length":57} + >skills = { primary: "SomeSkill", secondary: "someSkill" } + >:=> (line 31, col 16) to (line 31, col 73) +31 >function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { + + ~~~~~~~~~~~~~~~~~=> Pos: (853 to 869) SpanInfo: {"start":791,"length":78} + >{ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA + >:=> (line 31, col 14) to (line 31, col 92) +31 >function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { + + ~~~=> Pos: (870 to 872) SpanInfo: {"start":877,"length":27} + >console.log(skills.primary) + >:=> (line 32, col 4) to (line 32, col 31) +-------------------------------- +32 > console.log(skills.primary); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (873 to 905) SpanInfo: {"start":877,"length":27} + >console.log(skills.primary) + >:=> (line 32, col 4) to (line 32, col 31) +-------------------------------- +33 >} + + ~~ => Pos: (906 to 907) SpanInfo: {"start":906,"length":1} + >} + >:=> (line 33, col 0) to (line 33, col 1) +-------------------------------- +34 >foo1(robotA); + + ~~~~~~~~~~~~~~ => Pos: (908 to 921) SpanInfo: {"start":908,"length":12} + >foo1(robotA) + >:=> (line 34, col 0) to (line 34, col 12) +-------------------------------- +35 >foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (922 to 1007) SpanInfo: {"start":922,"length":84} + >foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) + >:=> (line 35, col 0) to (line 35, col 84) +-------------------------------- +36 >foo2(robotA); + + ~~~~~~~~~~~~~~ => Pos: (1008 to 1021) SpanInfo: {"start":1008,"length":12} + >foo2(robotA) + >:=> (line 36, col 0) to (line 36, col 12) +-------------------------------- +37 >foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1022 to 1107) SpanInfo: {"start":1022,"length":84} + >foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) + >:=> (line 37, col 0) to (line 37, col 84) +-------------------------------- +38 >foo3(robotA); + + ~~~~~~~~~~~~~~ => Pos: (1108 to 1121) SpanInfo: {"start":1108,"length":12} + >foo3(robotA) + >:=> (line 38, col 0) to (line 38, col 12) +-------------------------------- +39 >foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1122 to 1206) SpanInfo: {"start":1122,"length":84} + >foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }) + >:=> (line 39, col 0) to (line 39, col 84) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPattern.baseline b/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPattern.baseline new file mode 100644 index 00000000000..6279328ed0c --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPattern.baseline @@ -0,0 +1,164 @@ + +1 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (0 to 17) SpanInfo: undefined +-------------------------------- +2 > name: string; + + ~~~~~~~~~~~~~~~~~~ => Pos: (18 to 35) SpanInfo: undefined +-------------------------------- +3 > skill: string; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (36 to 54) SpanInfo: undefined +-------------------------------- +4 >} + + ~~ => Pos: (55 to 56) SpanInfo: undefined +-------------------------------- +5 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (57 to 79) SpanInfo: undefined +-------------------------------- +6 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (80 to 107) SpanInfo: undefined +-------------------------------- +7 >} + + ~~ => Pos: (108 to 109) SpanInfo: undefined +-------------------------------- +8 >var hello = "hello"; + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (110 to 130) SpanInfo: {"start":110,"length":19} + >var hello = "hello" + >:=> (line 8, col 0) to (line 8, col 19) +-------------------------------- +9 >var robotA: Robot = { name: "mower", skill: "mowing" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (131 to 186) SpanInfo: {"start":131,"length":54} + >var robotA: Robot = { name: "mower", skill: "mowing" } + >:=> (line 9, col 0) to (line 9, col 54) +-------------------------------- +10 >function foo1({ name: nameA }: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (187 to 200) SpanInfo: {"start":231,"length":18} + >console.log(nameA) + >:=> (line 11, col 4) to (line 11, col 22) +10 >function foo1({ name: nameA }: Robot) { + + ~~~~~~~~~~~~~~~ => Pos: (201 to 215) SpanInfo: {"start":203,"length":11} + >name: nameA + >:=> (line 10, col 16) to (line 10, col 27) +10 >function foo1({ name: nameA }: Robot) { + + ~~~~~~~~~~~ => Pos: (216 to 226) SpanInfo: {"start":231,"length":18} + >console.log(nameA) + >:=> (line 11, col 4) to (line 11, col 22) +-------------------------------- +11 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (227 to 250) SpanInfo: {"start":231,"length":18} + >console.log(nameA) + >:=> (line 11, col 4) to (line 11, col 22) +-------------------------------- +12 >} + + ~~ => Pos: (251 to 252) SpanInfo: {"start":251,"length":1} + >} + >:=> (line 12, col 0) to (line 12, col 1) +-------------------------------- +13 >function foo2({ name: nameB, skill: skillB }: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (253 to 266) SpanInfo: {"start":312,"length":18} + >console.log(nameB) + >:=> (line 14, col 4) to (line 14, col 22) +13 >function foo2({ name: nameB, skill: skillB }: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (267 to 280) SpanInfo: {"start":269,"length":11} + >name: nameB + >:=> (line 13, col 16) to (line 13, col 27) +13 >function foo2({ name: nameB, skill: skillB }: Robot) { + + ~~~~~~~~~~~~~~~~ => Pos: (281 to 296) SpanInfo: {"start":282,"length":13} + >skill: skillB + >:=> (line 13, col 29) to (line 13, col 42) +13 >function foo2({ name: nameB, skill: skillB }: Robot) { + + ~~~~~~~~~~~=> Pos: (297 to 307) SpanInfo: {"start":312,"length":18} + >console.log(nameB) + >:=> (line 14, col 4) to (line 14, col 22) +-------------------------------- +14 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (308 to 331) SpanInfo: {"start":312,"length":18} + >console.log(nameB) + >:=> (line 14, col 4) to (line 14, col 22) +-------------------------------- +15 >} + + ~~ => Pos: (332 to 333) SpanInfo: {"start":332,"length":1} + >} + >:=> (line 15, col 0) to (line 15, col 1) +-------------------------------- +16 >function foo3({ name }: Robot) { + + ~~~~~~~~~~~~~~ => Pos: (334 to 347) SpanInfo: {"start":371,"length":17} + >console.log(name) + >:=> (line 17, col 4) to (line 17, col 21) +16 >function foo3({ name }: Robot) { + + ~~~~~~~~ => Pos: (348 to 355) SpanInfo: {"start":350,"length":4} + >name + >:=> (line 16, col 16) to (line 16, col 20) +16 >function foo3({ name }: Robot) { + + ~~~~~~~~~~~ => Pos: (356 to 366) SpanInfo: {"start":371,"length":17} + >console.log(name) + >:=> (line 17, col 4) to (line 17, col 21) +-------------------------------- +17 > console.log(name); + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (367 to 389) SpanInfo: {"start":371,"length":17} + >console.log(name) + >:=> (line 17, col 4) to (line 17, col 21) +-------------------------------- +18 >} + + ~~ => Pos: (390 to 391) SpanInfo: {"start":390,"length":1} + >} + >:=> (line 18, col 0) to (line 18, col 1) +-------------------------------- +19 >foo1(robotA); + + ~~~~~~~~~~~~~~ => Pos: (392 to 405) SpanInfo: {"start":392,"length":12} + >foo1(robotA) + >:=> (line 19, col 0) to (line 19, col 12) +-------------------------------- +20 >foo1({ name: "Edger", skill: "cutting edges" }); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (406 to 454) SpanInfo: {"start":406,"length":47} + >foo1({ name: "Edger", skill: "cutting edges" }) + >:=> (line 20, col 0) to (line 20, col 47) +-------------------------------- +21 >foo2(robotA); + + ~~~~~~~~~~~~~~ => Pos: (455 to 468) SpanInfo: {"start":455,"length":12} + >foo2(robotA) + >:=> (line 21, col 0) to (line 21, col 12) +-------------------------------- +22 >foo2({ name: "Edger", skill: "cutting edges" }); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (469 to 517) SpanInfo: {"start":469,"length":47} + >foo2({ name: "Edger", skill: "cutting edges" }) + >:=> (line 22, col 0) to (line 22, col 47) +-------------------------------- +23 >foo3(robotA); + + ~~~~~~~~~~~~~~ => Pos: (518 to 531) SpanInfo: {"start":518,"length":12} + >foo3(robotA) + >:=> (line 23, col 0) to (line 23, col 12) +-------------------------------- +24 >foo3({ name: "Edger", skill: "cutting edges" }); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (532 to 579) SpanInfo: {"start":532,"length":47} + >foo3({ name: "Edger", skill: "cutting edges" }) + >:=> (line 24, col 0) to (line 24, col 47) \ No newline at end of file diff --git a/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPatternDefaultValues.baseline new file mode 100644 index 00000000000..a2392f5794c --- /dev/null +++ b/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPatternDefaultValues.baseline @@ -0,0 +1,179 @@ + +1 >interface Robot { + + ~~~~~~~~~~~~~~~~~~ => Pos: (0 to 17) SpanInfo: undefined +-------------------------------- +2 > name?: string; + + ~~~~~~~~~~~~~~~~~~~ => Pos: (18 to 36) SpanInfo: undefined +-------------------------------- +3 > skill?: string; + + ~~~~~~~~~~~~~~~~~~~~ => Pos: (37 to 56) SpanInfo: undefined +-------------------------------- +4 >} + + ~~ => Pos: (57 to 58) SpanInfo: undefined +-------------------------------- +5 >declare var console: { + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (59 to 81) SpanInfo: undefined +-------------------------------- +6 > log(msg: string): void; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (82 to 109) SpanInfo: undefined +-------------------------------- +7 >} + + ~~ => Pos: (110 to 111) SpanInfo: undefined +-------------------------------- +8 >var hello = "hello"; + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (112 to 132) SpanInfo: {"start":112,"length":19} + >var hello = "hello" + >:=> (line 8, col 0) to (line 8, col 19) +-------------------------------- +9 >var robotA: Robot = { name: "mower", skill: "mowing" }; + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (133 to 188) SpanInfo: {"start":133,"length":54} + >var robotA: Robot = { name: "mower", skill: "mowing" } + >:=> (line 9, col 0) to (line 9, col 54) +-------------------------------- +10 >function foo1({ name: nameA = "" }: Robot = { }) { + + ~~~~~~~~~~~~~~ => Pos: (189 to 202) SpanInfo: {"start":252,"length":18} + >console.log(nameA) + >:=> (line 11, col 4) to (line 11, col 22) +10 >function foo1({ name: nameA = "" }: Robot = { }) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (203 to 230) SpanInfo: {"start":205,"length":24} + >name: nameA = "" + >:=> (line 10, col 16) to (line 10, col 40) +10 >function foo1({ name: nameA = "" }: Robot = { }) { + + ~~~~~~~~~~~~~~=> Pos: (231 to 244) SpanInfo: {"start":203,"length":41} + >{ name: nameA = "" }: Robot = { } + >:=> (line 10, col 14) to (line 10, col 55) +10 >function foo1({ name: nameA = "" }: Robot = { }) { + + ~~~=> Pos: (245 to 247) SpanInfo: {"start":252,"length":18} + >console.log(nameA) + >:=> (line 11, col 4) to (line 11, col 22) +-------------------------------- +11 > console.log(nameA); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (248 to 271) SpanInfo: {"start":252,"length":18} + >console.log(nameA) + >:=> (line 11, col 4) to (line 11, col 22) +-------------------------------- +12 >} + + ~~ => Pos: (272 to 273) SpanInfo: {"start":272,"length":1} + >} + >:=> (line 12, col 0) to (line 12, col 1) +-------------------------------- +13 >function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { + + ~~~~~~~~~~~~~~ => Pos: (274 to 287) SpanInfo: {"start":363,"length":18} + >console.log(nameB) + >:=> (line 14, col 4) to (line 14, col 22) +13 >function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (288 to 314) SpanInfo: {"start":290,"length":24} + >name: nameB = "" + >:=> (line 13, col 16) to (line 13, col 40) +13 >function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (315 to 342) SpanInfo: {"start":316,"length":25} + >skill: skillB = "noSkill" + >:=> (line 13, col 42) to (line 13, col 67) +13 >function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { + + ~~~~~~~~~~~~~=> Pos: (343 to 355) SpanInfo: {"start":288,"length":67} + >{ name: nameB = "", skill: skillB = "noSkill" }: Robot = {} + >:=> (line 13, col 14) to (line 13, col 81) +13 >function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { + + ~~~=> Pos: (356 to 358) SpanInfo: {"start":363,"length":18} + >console.log(nameB) + >:=> (line 14, col 4) to (line 14, col 22) +-------------------------------- +14 > console.log(nameB); + + ~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (359 to 382) SpanInfo: {"start":363,"length":18} + >console.log(nameB) + >:=> (line 14, col 4) to (line 14, col 22) +-------------------------------- +15 >} + + ~~ => Pos: (383 to 384) SpanInfo: {"start":383,"length":1} + >} + >:=> (line 15, col 0) to (line 15, col 1) +-------------------------------- +16 >function foo3({ name = "" }: Robot = {}) { + + ~~~~~~~~~~~~~~ => Pos: (385 to 398) SpanInfo: {"start":440,"length":17} + >console.log(name) + >:=> (line 17, col 4) to (line 17, col 21) +16 >function foo3({ name = "" }: Robot = {}) { + + ~~~~~~~~~~~~~~~~~~~~~ => Pos: (399 to 419) SpanInfo: {"start":401,"length":17} + >name = "" + >:=> (line 16, col 16) to (line 16, col 33) +16 >function foo3({ name = "" }: Robot = {}) { + + ~~~~~~~~~~~~~=> Pos: (420 to 432) SpanInfo: {"start":399,"length":33} + >{ name = "" }: Robot = {} + >:=> (line 16, col 14) to (line 16, col 47) +16 >function foo3({ name = "" }: Robot = {}) { + + ~~~=> Pos: (433 to 435) SpanInfo: {"start":440,"length":17} + >console.log(name) + >:=> (line 17, col 4) to (line 17, col 21) +-------------------------------- +17 > console.log(name); + + ~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (436 to 458) SpanInfo: {"start":440,"length":17} + >console.log(name) + >:=> (line 17, col 4) to (line 17, col 21) +-------------------------------- +18 >} + + ~~ => Pos: (459 to 460) SpanInfo: {"start":459,"length":1} + >} + >:=> (line 18, col 0) to (line 18, col 1) +-------------------------------- +19 >foo1(robotA); + + ~~~~~~~~~~~~~~ => Pos: (461 to 474) SpanInfo: {"start":461,"length":12} + >foo1(robotA) + >:=> (line 19, col 0) to (line 19, col 12) +-------------------------------- +20 >foo1({ name: "Edger", skill: "cutting edges" }); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (475 to 523) SpanInfo: {"start":475,"length":47} + >foo1({ name: "Edger", skill: "cutting edges" }) + >:=> (line 20, col 0) to (line 20, col 47) +-------------------------------- +21 >foo2(robotA); + + ~~~~~~~~~~~~~~ => Pos: (524 to 537) SpanInfo: {"start":524,"length":12} + >foo2(robotA) + >:=> (line 21, col 0) to (line 21, col 12) +-------------------------------- +22 >foo2({ name: "Edger", skill: "cutting edges" }); + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (538 to 586) SpanInfo: {"start":538,"length":47} + >foo2({ name: "Edger", skill: "cutting edges" }) + >:=> (line 22, col 0) to (line 22, col 47) +-------------------------------- +23 >foo3(robotA); + + ~~~~~~~~~~~~~~ => Pos: (587 to 600) SpanInfo: {"start":587,"length":12} + >foo3(robotA) + >:=> (line 23, col 0) to (line 23, col 12) +-------------------------------- +24 >foo3({ name: "Edger", skill: "cutting edges" }); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (601 to 648) SpanInfo: {"start":601,"length":47} + >foo3({ name: "Edger", skill: "cutting edges" }) + >:=> (line 24, col 0) to (line 24, col 47) \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPattern.ts new file mode 100644 index 00000000000..c3f91122010 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPattern.ts @@ -0,0 +1,29 @@ +/// + +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [number, string, string]; +////var robotA: Robot = [1, "mower", "mowing"]; +////function foo1([, nameA]: Robot) { +//// console.log(nameA); +////} +////function foo2([numberB]: Robot) { +//// console.log(numberB); +////} +////function foo3([numberA2, nameA2, skillA2]: Robot) { +//// console.log(nameA2); +////} +////function foo4([numberA3, ...robotAInfo]: Robot) { +//// console.log(robotAInfo); +////} +////foo1(robotA); +////foo1([2, "trimmer", "trimming"]); +////foo2(robotA); +////foo2([2, "trimmer", "trimming"]); +////foo3(robotA); +////foo3([2, "trimmer", "trimming"]); +////foo4(robotA); +////foo4([2, "trimmer", "trimming"]); + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPattern2.ts b/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPattern2.ts new file mode 100644 index 00000000000..fbedbe4abb0 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPattern2.ts @@ -0,0 +1,29 @@ +/// + +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [string, [string, string]]; +////var robotA: Robot = ["trimmer", ["trimming", "edging"]]; +////function foo1([, skillA]: Robot) { +//// console.log(skillA); +////} +////function foo2([nameMB]: Robot) { +//// console.log(nameMB); +////} +////function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) { +//// console.log(nameMA); +////} +////function foo4([...multiRobotAInfo]: Robot) { +//// console.log(multiRobotAInfo); +////} +////foo1(robotA); +////foo1(["roomba", ["vaccum", "mopping"]]); +////foo2(robotA); +////foo2(["roomba", ["vaccum", "mopping"]]); +////foo3(robotA); +////foo3(["roomba", ["vaccum", "mopping"]]); +////foo4(robotA); +////foo4(["roomba", ["vaccum", "mopping"]]); + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..275135ca520 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues.ts @@ -0,0 +1,28 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [number, string, string]; +////var robotA: Robot = [1, "mower", "mowing"]; +////function foo1([, nameA = "noName"]: Robot = [-1, "name", "skill"]) { +//// console.log(nameA); +////} +////function foo2([numberB = -1]: Robot = [-1, "name", "skill"]) { +//// console.log(numberB); +////} +////function foo3([numberA2 = -1, nameA2 = "name", skillA2 = "skill"]: Robot = [-1, "name", "skill"]) { +//// console.log(nameA2); +////} +////function foo4([numberA3 = -1, ...robotAInfo]: Robot = [-1, "name", "skill"]) { +//// console.log(robotAInfo); +////} +////foo1(robotA); +////foo1([2, "trimmer", "trimming"]); +////foo2(robotA); +////foo2([2, "trimmer", "trimming"]); +////foo3(robotA); +////foo3([2, "trimmer", "trimming"]); +////foo4(robotA); +////foo4([2, "trimmer", "trimming"]); + +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues2.ts b/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues2.ts new file mode 100644 index 00000000000..17d964618d1 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues2.ts @@ -0,0 +1,25 @@ +/// +////declare var console: { +//// log(msg: any): void; +////} +////type Robot = [string, string[]]; +////var robotA: Robot = ["trimmer", ["trimming", "edging"]]; +////function foo1([, skillA = ["noSkill", "noSkill"]]: Robot= ["name", ["skill1", "skill2"]]) { +//// console.log(skillA); +////} +////function foo2([nameMB = "noName"]: Robot = ["name", ["skill1", "skill2"]]) { +//// console.log(nameMB); +////} +////function foo3([nameMA = "noName", [ +//// primarySkillA = "primary", +//// secondarySkillA = "secondary" +////] = ["noSkill", "noSkill"]]: Robot) { +//// console.log(nameMA); +////} +////foo1(robotA); +////foo1(["roomba", ["vaccum", "mopping"]]); +////foo2(robotA); +////foo2(["roomba", ["vaccum", "mopping"]]); +////foo3(robotA); +////foo3(["roomba", ["vaccum", "mopping"]]); +verify.baselineCurrentFileBreakpointLocations(); \ No newline at end of file diff --git a/tests/cases/fourslash/breakpointValidationDestructuringParameterNestedObjectBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringParameterNestedObjectBindingPattern.ts new file mode 100644 index 00000000000..34b23d9fca2 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringParameterNestedObjectBindingPattern.ts @@ -0,0 +1,28 @@ +/// +////declare var console: { +//// log(msg: string): void; +////} +////interface Robot { +//// name: string; +//// skills: { +//// primary: string; +//// secondary: string; +//// }; +////} +////var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +////function foo1({ skills: { primary: primaryA, secondary: secondaryA } }: Robot) { +//// console.log(primaryA); +////} +////function foo2({ name: nameC, skills: { primary: primaryB, secondary: secondaryB } }: Robot) { +//// console.log(secondaryB); +////} +////function foo3({ skills }: Robot) { +//// console.log(skills.primary); +////} +////foo1(robotA); +////foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +////foo2(robotA); +////foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +////foo3(robotA); +////foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +verify.baselineCurrentFileBreakpointLocations(); diff --git a/tests/cases/fourslash/breakpointValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..8eab866428b --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.ts @@ -0,0 +1,41 @@ +/// +////declare var console: { +//// log(msg: string): void; +////} +////interface Robot { +//// name: string; +//// skills: { +//// primary?: string; +//// secondary?: string; +//// }; +////} +////var robotA: Robot = { name: "mower", skills: { primary: "mowing", secondary: "none" } }; +////function foo1( +//// { +//// skills: { +//// primary: primaryA = "primary", +//// secondary: secondaryA = "secondary" +//// } = { primary: "SomeSkill", secondary: "someSkill" } +//// }: Robot = robotA) { +//// console.log(primaryA); +////} +////function foo2( +//// { +//// name: nameC = "name", +//// skills: { +//// primary: primaryB = "primary", +//// secondary: secondaryB = "secondary" +//// } = { primary: "SomeSkill", secondary: "someSkill" } +//// }: Robot = robotA) { +//// console.log(secondaryB); +////} +////function foo3({ skills = { primary: "SomeSkill", secondary: "someSkill" } }: Robot = robotA) { +//// console.log(skills.primary); +////} +////foo1(robotA); +////foo1({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +////foo2(robotA); +////foo2({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +////foo3(robotA); +////foo3({ name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }); +verify.baselineCurrentFileBreakpointLocations(); diff --git a/tests/cases/fourslash/breakpointValidationDestructuringParameterObjectBindingPattern.ts b/tests/cases/fourslash/breakpointValidationDestructuringParameterObjectBindingPattern.ts new file mode 100644 index 00000000000..1e3d7c905d4 --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringParameterObjectBindingPattern.ts @@ -0,0 +1,26 @@ +/// +////interface Robot { +//// name: string; +//// skill: string; +////} +////declare var console: { +//// log(msg: string): void; +////} +////var hello = "hello"; +////var robotA: Robot = { name: "mower", skill: "mowing" }; +////function foo1({ name: nameA }: Robot) { +//// console.log(nameA); +////} +////function foo2({ name: nameB, skill: skillB }: Robot) { +//// console.log(nameB); +////} +////function foo3({ name }: Robot) { +//// console.log(name); +////} +////foo1(robotA); +////foo1({ name: "Edger", skill: "cutting edges" }); +////foo2(robotA); +////foo2({ name: "Edger", skill: "cutting edges" }); +////foo3(robotA); +////foo3({ name: "Edger", skill: "cutting edges" }); +verify.baselineCurrentFileBreakpointLocations(); diff --git a/tests/cases/fourslash/breakpointValidationDestructuringParameterObjectBindingPatternDefaultValues.ts b/tests/cases/fourslash/breakpointValidationDestructuringParameterObjectBindingPatternDefaultValues.ts new file mode 100644 index 00000000000..bd87e346f6f --- /dev/null +++ b/tests/cases/fourslash/breakpointValidationDestructuringParameterObjectBindingPatternDefaultValues.ts @@ -0,0 +1,26 @@ +/// +////interface Robot { +//// name?: string; +//// skill?: string; +////} +////declare var console: { +//// log(msg: string): void; +////} +////var hello = "hello"; +////var robotA: Robot = { name: "mower", skill: "mowing" }; +////function foo1({ name: nameA = "" }: Robot = { }) { +//// console.log(nameA); +////} +////function foo2({ name: nameB = "", skill: skillB = "noSkill" }: Robot = {}) { +//// console.log(nameB); +////} +////function foo3({ name = "" }: Robot = {}) { +//// console.log(name); +////} +////foo1(robotA); +////foo1({ name: "Edger", skill: "cutting edges" }); +////foo2(robotA); +////foo2({ name: "Edger", skill: "cutting edges" }); +////foo3(robotA); +////foo3({ name: "Edger", skill: "cutting edges" }); +verify.baselineCurrentFileBreakpointLocations();