Test cases for nested array binding pattern destructuring in parameters

This commit is contained in:
Sheetal Nandi 2015-12-04 13:53:40 -08:00
parent bdcdd67fb2
commit 6f896836b8
6 changed files with 910 additions and 0 deletions

View file

@ -0,0 +1,62 @@
//// [sourceMapValidationDestructuringParametertArrayBindingPattern2.ts]
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"]]);
//// [sourceMapValidationDestructuringParametertArrayBindingPattern2.js]
var robotA = ["trimmer", ["trimming", "edging"]];
function foo1(_a) {
var skillA = _a[1];
console.log(skillA);
}
function foo2(_a) {
var nameMB = _a[0];
console.log(nameMB);
}
function foo3(_a) {
var nameMA = _a[0], _b = _a[1], primarySkillA = _b[0], secondarySkillA = _b[1];
console.log(nameMA);
}
function foo4(_a) {
var multiRobotAInfo = _a.slice(0);
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"]]);
//# sourceMappingURL=sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map

View file

@ -0,0 +1,2 @@
//// [sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map]
{"version":3,"file":"sourceMapValidationDestructuringParametertArrayBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringParametertArrayBindingPattern2.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAExD,cAAc,EAAiB;QAAjB,cAAiB;IAC3B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAe;QAAf,cAAe;IACzB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAAiD;QAAhD,cAAM,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe;IAClD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,cAAc,EAA2B;QAA3B,6BAA2B;IACrC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACjC,CAAC;AAED,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAExC,IAAI,CAAC,MAAM,CAAC,CAAC;AACb,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC"}

View file

@ -0,0 +1,588 @@
===================================================================
JsFile: sourceMapValidationDestructuringParametertArrayBindingPattern2.js
mapUrl: sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map
sourceRoot:
sources: sourceMapValidationDestructuringParametertArrayBindingPattern2.ts
===================================================================
-------------------------------------------------------------------
emittedFile:tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern2.js
sourceFile:sourceMapValidationDestructuringParametertArrayBindingPattern2.ts
-------------------------------------------------------------------
>>>var robotA = ["trimmer", ["trimming", "edging"]];
1 >
2 >^^^^
3 > ^^^^^^
4 > ^^^
5 > ^
6 > ^^^^^^^^^
7 > ^^
8 > ^
9 > ^^^^^^^^^^
10> ^^
11> ^^^^^^^^
12> ^
13> ^
14> ^
1 >declare var console: {
> log(msg: any): void;
>}
>type Robot = [string, [string, string]];
>
2 >var
3 > robotA
4 > : Robot =
5 > [
6 > "trimmer"
7 > ,
8 > [
9 > "trimming"
10> ,
11> "edging"
12> ]
13> ]
14> ;
1 >Emitted(1, 1) Source(5, 1) + SourceIndex(0)
2 >Emitted(1, 5) Source(5, 5) + SourceIndex(0)
3 >Emitted(1, 11) Source(5, 11) + SourceIndex(0)
4 >Emitted(1, 14) Source(5, 21) + SourceIndex(0)
5 >Emitted(1, 15) Source(5, 22) + SourceIndex(0)
6 >Emitted(1, 24) Source(5, 31) + SourceIndex(0)
7 >Emitted(1, 26) Source(5, 33) + SourceIndex(0)
8 >Emitted(1, 27) Source(5, 34) + SourceIndex(0)
9 >Emitted(1, 37) Source(5, 44) + SourceIndex(0)
10>Emitted(1, 39) Source(5, 46) + SourceIndex(0)
11>Emitted(1, 47) Source(5, 54) + SourceIndex(0)
12>Emitted(1, 48) Source(5, 55) + SourceIndex(0)
13>Emitted(1, 49) Source(5, 56) + SourceIndex(0)
14>Emitted(1, 50) Source(5, 57) + SourceIndex(0)
---
>>>function foo1(_a) {
1 >
2 >^^^^^^^^^^^^^^
3 > ^^
4 > ^^^^^^^^->
1 >
>
>
2 >function foo1(
3 > [, skillA]: Robot
1 >Emitted(2, 1) Source(7, 1) + SourceIndex(0)
2 >Emitted(2, 15) Source(7, 15) + SourceIndex(0)
3 >Emitted(2, 17) Source(7, 32) + SourceIndex(0)
---
>>> var skillA = _a[1];
1->^^^^^^^^
2 > ^^^^^^^^^^^^^^
3 > ^^^->
1->
2 > [, skillA]: Robot
1->Emitted(3, 9) Source(7, 15) + SourceIndex(0)
2 >Emitted(3, 23) Source(7, 32) + SourceIndex(0)
---
>>> console.log(skillA);
1->^^^^
2 > ^^^^^^^
3 > ^
4 > ^^^
5 > ^
6 > ^^^^^^
7 > ^
8 > ^
1->) {
>
2 > console
3 > .
4 > log
5 > (
6 > skillA
7 > )
8 > ;
1->Emitted(4, 5) Source(8, 5) + SourceIndex(0)
2 >Emitted(4, 12) Source(8, 12) + SourceIndex(0)
3 >Emitted(4, 13) Source(8, 13) + SourceIndex(0)
4 >Emitted(4, 16) Source(8, 16) + SourceIndex(0)
5 >Emitted(4, 17) Source(8, 17) + SourceIndex(0)
6 >Emitted(4, 23) Source(8, 23) + SourceIndex(0)
7 >Emitted(4, 24) Source(8, 24) + SourceIndex(0)
8 >Emitted(4, 25) Source(8, 25) + SourceIndex(0)
---
>>>}
1 >
2 >^
3 > ^^^^^^^^^^^^^^^^^^^->
1 >
>
2 >}
1 >Emitted(5, 1) Source(9, 1) + SourceIndex(0)
2 >Emitted(5, 2) Source(9, 2) + SourceIndex(0)
---
>>>function foo2(_a) {
1->
2 >^^^^^^^^^^^^^^
3 > ^^
4 > ^^^^^^^^->
1->
>
>
2 >function foo2(
3 > [nameMB]: Robot
1->Emitted(6, 1) Source(11, 1) + SourceIndex(0)
2 >Emitted(6, 15) Source(11, 15) + SourceIndex(0)
3 >Emitted(6, 17) Source(11, 30) + SourceIndex(0)
---
>>> var nameMB = _a[0];
1->^^^^^^^^
2 > ^^^^^^^^^^^^^^
3 > ^^^->
1->
2 > [nameMB]: Robot
1->Emitted(7, 9) Source(11, 15) + SourceIndex(0)
2 >Emitted(7, 23) Source(11, 30) + SourceIndex(0)
---
>>> console.log(nameMB);
1->^^^^
2 > ^^^^^^^
3 > ^
4 > ^^^
5 > ^
6 > ^^^^^^
7 > ^
8 > ^
1->) {
>
2 > console
3 > .
4 > log
5 > (
6 > nameMB
7 > )
8 > ;
1->Emitted(8, 5) Source(12, 5) + SourceIndex(0)
2 >Emitted(8, 12) Source(12, 12) + SourceIndex(0)
3 >Emitted(8, 13) Source(12, 13) + SourceIndex(0)
4 >Emitted(8, 16) Source(12, 16) + SourceIndex(0)
5 >Emitted(8, 17) Source(12, 17) + SourceIndex(0)
6 >Emitted(8, 23) Source(12, 23) + SourceIndex(0)
7 >Emitted(8, 24) Source(12, 24) + SourceIndex(0)
8 >Emitted(8, 25) Source(12, 25) + SourceIndex(0)
---
>>>}
1 >
2 >^
3 > ^^^^^^^^^^^^^^^^^^^->
1 >
>
2 >}
1 >Emitted(9, 1) Source(13, 1) + SourceIndex(0)
2 >Emitted(9, 2) Source(13, 2) + SourceIndex(0)
---
>>>function foo3(_a) {
1->
2 >^^^^^^^^^^^^^^
3 > ^^
4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1->
>
>
2 >function foo3(
3 > [nameMA, [primarySkillA, secondarySkillA]]: Robot
1->Emitted(10, 1) Source(15, 1) + SourceIndex(0)
2 >Emitted(10, 15) Source(15, 15) + SourceIndex(0)
3 >Emitted(10, 17) Source(15, 64) + SourceIndex(0)
---
>>> var nameMA = _a[0], _b = _a[1], primarySkillA = _b[0], secondarySkillA = _b[1];
1->^^^^^^^^
2 > ^^^^^^^^^^^^^^
3 > ^^
4 > ^^^^^^^^^^
5 > ^^
6 > ^^^^^^^^^^^^^^^^^^^^^
7 > ^^
8 > ^^^^^^^^^^^^^^^^^^^^^^^
1->
2 > nameMA
3 > ,
4 > [primarySkillA, secondarySkillA]
5 >
6 > primarySkillA
7 > ,
8 > secondarySkillA
1->Emitted(11, 9) Source(15, 16) + SourceIndex(0)
2 >Emitted(11, 23) Source(15, 22) + SourceIndex(0)
3 >Emitted(11, 25) Source(15, 24) + SourceIndex(0)
4 >Emitted(11, 35) Source(15, 56) + SourceIndex(0)
5 >Emitted(11, 37) Source(15, 25) + SourceIndex(0)
6 >Emitted(11, 58) Source(15, 38) + SourceIndex(0)
7 >Emitted(11, 60) Source(15, 40) + SourceIndex(0)
8 >Emitted(11, 83) Source(15, 55) + SourceIndex(0)
---
>>> console.log(nameMA);
1 >^^^^
2 > ^^^^^^^
3 > ^
4 > ^^^
5 > ^
6 > ^^^^^^
7 > ^
8 > ^
1 >]]: Robot) {
>
2 > console
3 > .
4 > log
5 > (
6 > nameMA
7 > )
8 > ;
1 >Emitted(12, 5) Source(16, 5) + SourceIndex(0)
2 >Emitted(12, 12) Source(16, 12) + SourceIndex(0)
3 >Emitted(12, 13) Source(16, 13) + SourceIndex(0)
4 >Emitted(12, 16) Source(16, 16) + SourceIndex(0)
5 >Emitted(12, 17) Source(16, 17) + SourceIndex(0)
6 >Emitted(12, 23) Source(16, 23) + SourceIndex(0)
7 >Emitted(12, 24) Source(16, 24) + SourceIndex(0)
8 >Emitted(12, 25) Source(16, 25) + SourceIndex(0)
---
>>>}
1 >
2 >^
3 > ^^^^^^^^^^^^^^^^^^^->
1 >
>
2 >}
1 >Emitted(13, 1) Source(17, 1) + SourceIndex(0)
2 >Emitted(13, 2) Source(17, 2) + SourceIndex(0)
---
>>>function foo4(_a) {
1->
2 >^^^^^^^^^^^^^^
3 > ^^
4 > ^^^^^^^^^^^^^^^^^^^^^^^->
1->
>
>
2 >function foo4(
3 > [...multiRobotAInfo]: Robot
1->Emitted(14, 1) Source(19, 1) + SourceIndex(0)
2 >Emitted(14, 15) Source(19, 15) + SourceIndex(0)
3 >Emitted(14, 17) Source(19, 42) + SourceIndex(0)
---
>>> var multiRobotAInfo = _a.slice(0);
1->^^^^^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1->
2 > [...multiRobotAInfo]: Robot
1->Emitted(15, 9) Source(19, 15) + SourceIndex(0)
2 >Emitted(15, 38) Source(19, 42) + SourceIndex(0)
---
>>> console.log(multiRobotAInfo);
1 >^^^^
2 > ^^^^^^^
3 > ^
4 > ^^^
5 > ^
6 > ^^^^^^^^^^^^^^^
7 > ^
8 > ^
1 >) {
>
2 > console
3 > .
4 > log
5 > (
6 > multiRobotAInfo
7 > )
8 > ;
1 >Emitted(16, 5) Source(20, 5) + SourceIndex(0)
2 >Emitted(16, 12) Source(20, 12) + SourceIndex(0)
3 >Emitted(16, 13) Source(20, 13) + SourceIndex(0)
4 >Emitted(16, 16) Source(20, 16) + SourceIndex(0)
5 >Emitted(16, 17) Source(20, 17) + SourceIndex(0)
6 >Emitted(16, 32) Source(20, 32) + SourceIndex(0)
7 >Emitted(16, 33) Source(20, 33) + SourceIndex(0)
8 >Emitted(16, 34) Source(20, 34) + SourceIndex(0)
---
>>>}
1 >
2 >^
3 > ^^^^^^^^^^^^^->
1 >
>
2 >}
1 >Emitted(17, 1) Source(21, 1) + SourceIndex(0)
2 >Emitted(17, 2) Source(21, 2) + SourceIndex(0)
---
>>>foo1(robotA);
1->
2 >^^^^
3 > ^
4 > ^^^^^^
5 > ^
6 > ^
7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1->
>
>
2 >foo1
3 > (
4 > robotA
5 > )
6 > ;
1->Emitted(18, 1) Source(23, 1) + SourceIndex(0)
2 >Emitted(18, 5) Source(23, 5) + SourceIndex(0)
3 >Emitted(18, 6) Source(23, 6) + SourceIndex(0)
4 >Emitted(18, 12) Source(23, 12) + SourceIndex(0)
5 >Emitted(18, 13) Source(23, 13) + SourceIndex(0)
6 >Emitted(18, 14) Source(23, 14) + SourceIndex(0)
---
>>>foo1(["roomba", ["vaccum", "mopping"]]);
1->
2 >^^^^
3 > ^
4 > ^
5 > ^^^^^^^^
6 > ^^
7 > ^
8 > ^^^^^^^^
9 > ^^
10> ^^^^^^^^^
11> ^
12> ^
13> ^
14> ^
1->
>
2 >foo1
3 > (
4 > [
5 > "roomba"
6 > ,
7 > [
8 > "vaccum"
9 > ,
10> "mopping"
11> ]
12> ]
13> )
14> ;
1->Emitted(19, 1) Source(24, 1) + SourceIndex(0)
2 >Emitted(19, 5) Source(24, 5) + SourceIndex(0)
3 >Emitted(19, 6) Source(24, 6) + SourceIndex(0)
4 >Emitted(19, 7) Source(24, 7) + SourceIndex(0)
5 >Emitted(19, 15) Source(24, 15) + SourceIndex(0)
6 >Emitted(19, 17) Source(24, 17) + SourceIndex(0)
7 >Emitted(19, 18) Source(24, 18) + SourceIndex(0)
8 >Emitted(19, 26) Source(24, 26) + SourceIndex(0)
9 >Emitted(19, 28) Source(24, 28) + SourceIndex(0)
10>Emitted(19, 37) Source(24, 37) + SourceIndex(0)
11>Emitted(19, 38) Source(24, 38) + SourceIndex(0)
12>Emitted(19, 39) Source(24, 39) + SourceIndex(0)
13>Emitted(19, 40) Source(24, 40) + SourceIndex(0)
14>Emitted(19, 41) Source(24, 41) + SourceIndex(0)
---
>>>foo2(robotA);
1 >
2 >^^^^
3 > ^
4 > ^^^^^^
5 > ^
6 > ^
7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
>
2 >foo2
3 > (
4 > robotA
5 > )
6 > ;
1 >Emitted(20, 1) Source(26, 1) + SourceIndex(0)
2 >Emitted(20, 5) Source(26, 5) + SourceIndex(0)
3 >Emitted(20, 6) Source(26, 6) + SourceIndex(0)
4 >Emitted(20, 12) Source(26, 12) + SourceIndex(0)
5 >Emitted(20, 13) Source(26, 13) + SourceIndex(0)
6 >Emitted(20, 14) Source(26, 14) + SourceIndex(0)
---
>>>foo2(["roomba", ["vaccum", "mopping"]]);
1->
2 >^^^^
3 > ^
4 > ^
5 > ^^^^^^^^
6 > ^^
7 > ^
8 > ^^^^^^^^
9 > ^^
10> ^^^^^^^^^
11> ^
12> ^
13> ^
14> ^
1->
>
2 >foo2
3 > (
4 > [
5 > "roomba"
6 > ,
7 > [
8 > "vaccum"
9 > ,
10> "mopping"
11> ]
12> ]
13> )
14> ;
1->Emitted(21, 1) Source(27, 1) + SourceIndex(0)
2 >Emitted(21, 5) Source(27, 5) + SourceIndex(0)
3 >Emitted(21, 6) Source(27, 6) + SourceIndex(0)
4 >Emitted(21, 7) Source(27, 7) + SourceIndex(0)
5 >Emitted(21, 15) Source(27, 15) + SourceIndex(0)
6 >Emitted(21, 17) Source(27, 17) + SourceIndex(0)
7 >Emitted(21, 18) Source(27, 18) + SourceIndex(0)
8 >Emitted(21, 26) Source(27, 26) + SourceIndex(0)
9 >Emitted(21, 28) Source(27, 28) + SourceIndex(0)
10>Emitted(21, 37) Source(27, 37) + SourceIndex(0)
11>Emitted(21, 38) Source(27, 38) + SourceIndex(0)
12>Emitted(21, 39) Source(27, 39) + SourceIndex(0)
13>Emitted(21, 40) Source(27, 40) + SourceIndex(0)
14>Emitted(21, 41) Source(27, 41) + SourceIndex(0)
---
>>>foo3(robotA);
1 >
2 >^^^^
3 > ^
4 > ^^^^^^
5 > ^
6 > ^
7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
>
2 >foo3
3 > (
4 > robotA
5 > )
6 > ;
1 >Emitted(22, 1) Source(29, 1) + SourceIndex(0)
2 >Emitted(22, 5) Source(29, 5) + SourceIndex(0)
3 >Emitted(22, 6) Source(29, 6) + SourceIndex(0)
4 >Emitted(22, 12) Source(29, 12) + SourceIndex(0)
5 >Emitted(22, 13) Source(29, 13) + SourceIndex(0)
6 >Emitted(22, 14) Source(29, 14) + SourceIndex(0)
---
>>>foo3(["roomba", ["vaccum", "mopping"]]);
1->
2 >^^^^
3 > ^
4 > ^
5 > ^^^^^^^^
6 > ^^
7 > ^
8 > ^^^^^^^^
9 > ^^
10> ^^^^^^^^^
11> ^
12> ^
13> ^
14> ^
1->
>
2 >foo3
3 > (
4 > [
5 > "roomba"
6 > ,
7 > [
8 > "vaccum"
9 > ,
10> "mopping"
11> ]
12> ]
13> )
14> ;
1->Emitted(23, 1) Source(30, 1) + SourceIndex(0)
2 >Emitted(23, 5) Source(30, 5) + SourceIndex(0)
3 >Emitted(23, 6) Source(30, 6) + SourceIndex(0)
4 >Emitted(23, 7) Source(30, 7) + SourceIndex(0)
5 >Emitted(23, 15) Source(30, 15) + SourceIndex(0)
6 >Emitted(23, 17) Source(30, 17) + SourceIndex(0)
7 >Emitted(23, 18) Source(30, 18) + SourceIndex(0)
8 >Emitted(23, 26) Source(30, 26) + SourceIndex(0)
9 >Emitted(23, 28) Source(30, 28) + SourceIndex(0)
10>Emitted(23, 37) Source(30, 37) + SourceIndex(0)
11>Emitted(23, 38) Source(30, 38) + SourceIndex(0)
12>Emitted(23, 39) Source(30, 39) + SourceIndex(0)
13>Emitted(23, 40) Source(30, 40) + SourceIndex(0)
14>Emitted(23, 41) Source(30, 41) + SourceIndex(0)
---
>>>foo4(robotA);
1 >
2 >^^^^
3 > ^
4 > ^^^^^^
5 > ^
6 > ^
7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
>
2 >foo4
3 > (
4 > robotA
5 > )
6 > ;
1 >Emitted(24, 1) Source(32, 1) + SourceIndex(0)
2 >Emitted(24, 5) Source(32, 5) + SourceIndex(0)
3 >Emitted(24, 6) Source(32, 6) + SourceIndex(0)
4 >Emitted(24, 12) Source(32, 12) + SourceIndex(0)
5 >Emitted(24, 13) Source(32, 13) + SourceIndex(0)
6 >Emitted(24, 14) Source(32, 14) + SourceIndex(0)
---
>>>foo4(["roomba", ["vaccum", "mopping"]]);
1->
2 >^^^^
3 > ^
4 > ^
5 > ^^^^^^^^
6 > ^^
7 > ^
8 > ^^^^^^^^
9 > ^^
10> ^^^^^^^^^
11> ^
12> ^
13> ^
14> ^
15> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1->
>
2 >foo4
3 > (
4 > [
5 > "roomba"
6 > ,
7 > [
8 > "vaccum"
9 > ,
10> "mopping"
11> ]
12> ]
13> )
14> ;
1->Emitted(25, 1) Source(33, 1) + SourceIndex(0)
2 >Emitted(25, 5) Source(33, 5) + SourceIndex(0)
3 >Emitted(25, 6) Source(33, 6) + SourceIndex(0)
4 >Emitted(25, 7) Source(33, 7) + SourceIndex(0)
5 >Emitted(25, 15) Source(33, 15) + SourceIndex(0)
6 >Emitted(25, 17) Source(33, 17) + SourceIndex(0)
7 >Emitted(25, 18) Source(33, 18) + SourceIndex(0)
8 >Emitted(25, 26) Source(33, 26) + SourceIndex(0)
9 >Emitted(25, 28) Source(33, 28) + SourceIndex(0)
10>Emitted(25, 37) Source(33, 37) + SourceIndex(0)
11>Emitted(25, 38) Source(33, 38) + SourceIndex(0)
12>Emitted(25, 39) Source(33, 39) + SourceIndex(0)
13>Emitted(25, 40) Source(33, 40) + SourceIndex(0)
14>Emitted(25, 41) Source(33, 41) + SourceIndex(0)
---
>>>//# sourceMappingURL=sourceMapValidationDestructuringParametertArrayBindingPattern2.js.map

View file

@ -0,0 +1,93 @@
=== tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern2.ts ===
declare var console: {
>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 11))
log(msg: any): void;
>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22))
>msg : Symbol(msg, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 1, 8))
}
type Robot = [string, [string, string]];
>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 2, 1))
var robotA: Robot = ["trimmer", ["trimming", "edging"]];
>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 4, 3))
>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 2, 1))
function foo1([, skillA]: Robot) {
>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 4, 56))
>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 6, 16))
>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 2, 1))
console.log(skillA);
>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22))
>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 11))
>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22))
>skillA : Symbol(skillA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 6, 16))
}
function foo2([nameMB]: Robot) {
>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 8, 1))
>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 10, 15))
>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 2, 1))
console.log(nameMB);
>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22))
>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 11))
>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22))
>nameMB : Symbol(nameMB, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 10, 15))
}
function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) {
>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 12, 1))
>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 14, 15))
>primarySkillA : Symbol(primarySkillA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 14, 24))
>secondarySkillA : Symbol(secondarySkillA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 14, 38))
>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 2, 1))
console.log(nameMA);
>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22))
>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 11))
>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22))
>nameMA : Symbol(nameMA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 14, 15))
}
function foo4([...multiRobotAInfo]: Robot) {
>foo4 : Symbol(foo4, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 16, 1))
>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 18, 15))
>Robot : Symbol(Robot, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 2, 1))
console.log(multiRobotAInfo);
>console.log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22))
>console : Symbol(console, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 11))
>log : Symbol(log, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 0, 22))
>multiRobotAInfo : Symbol(multiRobotAInfo, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 18, 15))
}
foo1(robotA);
>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 4, 56))
>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 4, 3))
foo1(["roomba", ["vaccum", "mopping"]]);
>foo1 : Symbol(foo1, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 4, 56))
foo2(robotA);
>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 8, 1))
>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 4, 3))
foo2(["roomba", ["vaccum", "mopping"]]);
>foo2 : Symbol(foo2, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 8, 1))
foo3(robotA);
>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 12, 1))
>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 4, 3))
foo3(["roomba", ["vaccum", "mopping"]]);
>foo3 : Symbol(foo3, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 12, 1))
foo4(robotA);
>foo4 : Symbol(foo4, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 16, 1))
>robotA : Symbol(robotA, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 4, 3))
foo4(["roomba", ["vaccum", "mopping"]]);
>foo4 : Symbol(foo4, Decl(sourceMapValidationDestructuringParametertArrayBindingPattern2.ts, 16, 1))

View file

@ -0,0 +1,131 @@
=== tests/cases/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern2.ts ===
declare var console: {
>console : { log(msg: any): void; }
log(msg: any): void;
>log : (msg: any) => void
>msg : any
}
type Robot = [string, [string, string]];
>Robot : [string, [string, string]]
var robotA: Robot = ["trimmer", ["trimming", "edging"]];
>robotA : [string, [string, string]]
>Robot : [string, [string, string]]
>["trimmer", ["trimming", "edging"]] : [string, [string, string]]
>"trimmer" : string
>["trimming", "edging"] : [string, string]
>"trimming" : string
>"edging" : string
function foo1([, skillA]: Robot) {
>foo1 : ([, skillA]: [string, [string, string]]) => void
> : undefined
>skillA : [string, string]
>Robot : [string, [string, string]]
console.log(skillA);
>console.log(skillA) : void
>console.log : (msg: any) => void
>console : { log(msg: any): void; }
>log : (msg: any) => void
>skillA : [string, string]
}
function foo2([nameMB]: Robot) {
>foo2 : ([nameMB]: [string, [string, string]]) => void
>nameMB : string
>Robot : [string, [string, string]]
console.log(nameMB);
>console.log(nameMB) : void
>console.log : (msg: any) => void
>console : { log(msg: any): void; }
>log : (msg: any) => void
>nameMB : string
}
function foo3([nameMA, [primarySkillA, secondarySkillA]]: Robot) {
>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: [string, [string, string]]) => void
>nameMA : string
>primarySkillA : string
>secondarySkillA : string
>Robot : [string, [string, string]]
console.log(nameMA);
>console.log(nameMA) : void
>console.log : (msg: any) => void
>console : { log(msg: any): void; }
>log : (msg: any) => void
>nameMA : string
}
function foo4([...multiRobotAInfo]: Robot) {
>foo4 : ([...multiRobotAInfo]: [string, [string, string]]) => void
>multiRobotAInfo : (string | [string, string])[]
>Robot : [string, [string, string]]
console.log(multiRobotAInfo);
>console.log(multiRobotAInfo) : void
>console.log : (msg: any) => void
>console : { log(msg: any): void; }
>log : (msg: any) => void
>multiRobotAInfo : (string | [string, string])[]
}
foo1(robotA);
>foo1(robotA) : void
>foo1 : ([, skillA]: [string, [string, string]]) => void
>robotA : [string, [string, string]]
foo1(["roomba", ["vaccum", "mopping"]]);
>foo1(["roomba", ["vaccum", "mopping"]]) : void
>foo1 : ([, skillA]: [string, [string, string]]) => void
>["roomba", ["vaccum", "mopping"]] : [string, [string, string]]
>"roomba" : string
>["vaccum", "mopping"] : [string, string]
>"vaccum" : string
>"mopping" : string
foo2(robotA);
>foo2(robotA) : void
>foo2 : ([nameMB]: [string, [string, string]]) => void
>robotA : [string, [string, string]]
foo2(["roomba", ["vaccum", "mopping"]]);
>foo2(["roomba", ["vaccum", "mopping"]]) : void
>foo2 : ([nameMB]: [string, [string, string]]) => void
>["roomba", ["vaccum", "mopping"]] : [string, [string, string]]
>"roomba" : string
>["vaccum", "mopping"] : [string, string]
>"vaccum" : string
>"mopping" : string
foo3(robotA);
>foo3(robotA) : void
>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: [string, [string, string]]) => void
>robotA : [string, [string, string]]
foo3(["roomba", ["vaccum", "mopping"]]);
>foo3(["roomba", ["vaccum", "mopping"]]) : void
>foo3 : ([nameMA, [primarySkillA, secondarySkillA]]: [string, [string, string]]) => void
>["roomba", ["vaccum", "mopping"]] : [string, [string, string]]
>"roomba" : string
>["vaccum", "mopping"] : [string, string]
>"vaccum" : string
>"mopping" : string
foo4(robotA);
>foo4(robotA) : void
>foo4 : ([...multiRobotAInfo]: [string, [string, string]]) => void
>robotA : [string, [string, string]]
foo4(["roomba", ["vaccum", "mopping"]]);
>foo4(["roomba", ["vaccum", "mopping"]]) : void
>foo4 : ([...multiRobotAInfo]: [string, [string, string]]) => void
>["roomba", ["vaccum", "mopping"]] : [string, [string, string]]
>"roomba" : string
>["vaccum", "mopping"] : [string, string]
>"vaccum" : string
>"mopping" : string

View file

@ -0,0 +1,34 @@
// @sourcemap: true
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"]]);