Skip to content

Commit 5b122db

Browse files
committed
test sourceMap
1 parent 3894d05 commit 5b122db

File tree

4 files changed

+95
-0
lines changed

4 files changed

+95
-0
lines changed

tests/baselines/reference/restParameterWithBindingPattern2.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/baselines/reference/restParameterWithBindingPattern2.js.map

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
===================================================================
2+
JsFile: restParameterWithBindingPattern2.js
3+
mapUrl: restParameterWithBindingPattern2.js.map
4+
sourceRoot:
5+
sources: restParameterWithBindingPattern2.ts
6+
===================================================================
7+
-------------------------------------------------------------------
8+
emittedFile:tests/cases/compiler/restParameterWithBindingPattern2.js
9+
sourceFile:restParameterWithBindingPattern2.ts
10+
-------------------------------------------------------------------
11+
>>>function a() {
12+
1 >
13+
2 >^^^^^^^^^
14+
3 > ^
15+
4 > ^^^^^^^->
16+
1 >
17+
2 >function
18+
3 > a
19+
1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
20+
2 >Emitted(1, 10) Source(1, 10) + SourceIndex(0)
21+
3 >Emitted(1, 11) Source(1, 11) + SourceIndex(0)
22+
---
23+
>>> var _a = [];
24+
1->^^^^
25+
2 > ^^^^^^^^^^^^
26+
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
27+
1->(
28+
2 > ...[a, b]
29+
1->Emitted(2, 5) Source(1, 12) + SourceIndex(0)
30+
2 >Emitted(2, 17) Source(1, 21) + SourceIndex(0)
31+
---
32+
>>> for (var _i = 0; _i < arguments.length; _i++) {
33+
1->^^^^^^^^^
34+
2 > ^^^^^^^^^^
35+
3 > ^^
36+
4 > ^^^^^^^^^^^^^^^^^^^^^
37+
5 > ^^
38+
6 > ^^^^
39+
1->
40+
2 > ...[a, b]
41+
3 >
42+
4 > ...[a, b]
43+
5 >
44+
6 > ...[a, b]
45+
1->Emitted(3, 10) Source(1, 12) + SourceIndex(0)
46+
2 >Emitted(3, 20) Source(1, 21) + SourceIndex(0)
47+
3 >Emitted(3, 22) Source(1, 12) + SourceIndex(0)
48+
4 >Emitted(3, 43) Source(1, 21) + SourceIndex(0)
49+
5 >Emitted(3, 45) Source(1, 12) + SourceIndex(0)
50+
6 >Emitted(3, 49) Source(1, 21) + SourceIndex(0)
51+
---
52+
>>> _a[_i] = arguments[_i];
53+
1 >^^^^^^^^
54+
2 > ^^^^^^^^^^^^^^^^^^^^^^^
55+
1 >
56+
2 > ...[a, b]
57+
1 >Emitted(4, 9) Source(1, 12) + SourceIndex(0)
58+
2 >Emitted(4, 32) Source(1, 21) + SourceIndex(0)
59+
---
60+
>>> }
61+
>>> var a = _a[0], b = _a[1];
62+
1 >^^^^
63+
2 > ^^^^
64+
3 > ^^^^^^^^^
65+
4 > ^^
66+
5 > ^^^^^^^^^
67+
6 > ^
68+
1 >
69+
2 > ...[
70+
3 > a
71+
4 > ,
72+
5 > b
73+
6 > ]
74+
1 >Emitted(6, 5) Source(1, 12) + SourceIndex(0)
75+
2 >Emitted(6, 9) Source(1, 16) + SourceIndex(0)
76+
3 >Emitted(6, 18) Source(1, 17) + SourceIndex(0)
77+
4 >Emitted(6, 20) Source(1, 19) + SourceIndex(0)
78+
5 >Emitted(6, 29) Source(1, 20) + SourceIndex(0)
79+
6 >Emitted(6, 30) Source(1, 21) + SourceIndex(0)
80+
---
81+
>>>}
82+
1 >
83+
2 >^
84+
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
85+
1 >) {
86+
2 >}
87+
1 >Emitted(7, 1) Source(1, 25) + SourceIndex(0)
88+
2 >Emitted(7, 2) Source(1, 26) + SourceIndex(0)
89+
---
90+
>>>//# sourceMappingURL=restParameterWithBindingPattern2.js.map
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
// @sourcemap: true
2+
13
function a(...[a, b]) { }

0 commit comments

Comments
 (0)