commit
6cc44d1a15
|
@ -16,6 +16,14 @@ namespace ts {
|
|||
}
|
||||
|
||||
let nullSourceMapWriter: SourceMapWriter;
|
||||
// Used for initialize lastEncodedSourceMapSpan and reset lastEncodedSourceMapSpan when updateLastEncodedAndRecordedSpans
|
||||
const defaultLastEncodedSourceMapSpan: SourceMapSpan = {
|
||||
emittedLine: 1,
|
||||
emittedColumn: 1,
|
||||
sourceLine: 1,
|
||||
sourceColumn: 1,
|
||||
sourceIndex: 0
|
||||
};
|
||||
|
||||
export function getNullSourceMapWriter(): SourceMapWriter {
|
||||
if (nullSourceMapWriter === undefined) {
|
||||
|
@ -79,13 +87,7 @@ namespace ts {
|
|||
|
||||
// Last recorded and encoded spans
|
||||
lastRecordedSourceMapSpan = undefined;
|
||||
lastEncodedSourceMapSpan = {
|
||||
emittedLine: 1,
|
||||
emittedColumn: 1,
|
||||
sourceLine: 1,
|
||||
sourceColumn: 1,
|
||||
sourceIndex: 0
|
||||
};
|
||||
lastEncodedSourceMapSpan = defaultLastEncodedSourceMapSpan;
|
||||
lastEncodedNameIndex = 0;
|
||||
|
||||
// Initialize source map data
|
||||
|
@ -159,10 +161,12 @@ namespace ts {
|
|||
// Pop sourceMapDecodedMappings to remove last entry
|
||||
sourceMapData.sourceMapDecodedMappings.pop();
|
||||
|
||||
// Change the last encoded source map
|
||||
// Point the lastEncodedSourceMapSpace to the previous encoded sourceMapSpan
|
||||
// If the list is empty which indicates that we are at the beginning of the file,
|
||||
// we have to reset it to default value (same value when we first initialize sourceMapWriter)
|
||||
lastEncodedSourceMapSpan = sourceMapData.sourceMapDecodedMappings.length ?
|
||||
sourceMapData.sourceMapDecodedMappings[sourceMapData.sourceMapDecodedMappings.length - 1] :
|
||||
undefined;
|
||||
defaultLastEncodedSourceMapSpan;
|
||||
|
||||
// TODO: Update lastEncodedNameIndex
|
||||
// Since we dont support this any more, lets not worry about it right now.
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts]
|
||||
|
||||
var [x] = [1, 2];
|
||||
|
||||
//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js]
|
||||
var x = [1, 2][0];
|
||||
//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js.map
|
|
@ -0,0 +1,2 @@
|
|||
//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js.map]
|
||||
{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts"],"names":[],"mappings":"AACK,iBAAC,CAAW"}
|
|
@ -0,0 +1,24 @@
|
|||
===================================================================
|
||||
JsFile: sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js
|
||||
mapUrl: sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js.map
|
||||
sourceRoot:
|
||||
sources: sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts
|
||||
===================================================================
|
||||
-------------------------------------------------------------------
|
||||
emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js
|
||||
sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>var x = [1, 2][0];
|
||||
1 >
|
||||
2 >^^^^^^^^^^^^^^^^^
|
||||
3 > ^
|
||||
4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>var [
|
||||
2 >x
|
||||
3 > ] = [1, 2];
|
||||
1 >Emitted(1, 1) Source(2, 6) + SourceIndex(0)
|
||||
2 >Emitted(1, 18) Source(2, 7) + SourceIndex(0)
|
||||
3 >Emitted(1, 19) Source(2, 18) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js.map
|
|
@ -0,0 +1,5 @@
|
|||
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts ===
|
||||
|
||||
var [x] = [1, 2];
|
||||
>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts, 1, 5))
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.ts ===
|
||||
|
||||
var [x] = [1, 2];
|
||||
>x : number
|
||||
>[1, 2] : [number, number]
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts]
|
||||
|
||||
var [x] = [1, 2];
|
||||
var [y, z] = [1, 2];
|
||||
|
||||
//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js]
|
||||
var x = [1, 2][0];
|
||||
var _a = [1, 2], y = _a[0], z = _a[1];
|
||||
//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map
|
|
@ -0,0 +1,2 @@
|
|||
//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map]
|
||||
{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts"],"names":[],"mappings":"AACK,iBAAC,CAAW;AACjB,IAAA,WAAmB,EAAd,SAAC,EAAE,SAAC,CAAW"}
|
|
@ -0,0 +1,52 @@
|
|||
===================================================================
|
||||
JsFile: sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js
|
||||
mapUrl: sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map
|
||||
sourceRoot:
|
||||
sources: sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts
|
||||
===================================================================
|
||||
-------------------------------------------------------------------
|
||||
emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js
|
||||
sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>var x = [1, 2][0];
|
||||
1 >
|
||||
2 >^^^^^^^^^^^^^^^^^
|
||||
3 > ^
|
||||
4 > ^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>var [
|
||||
2 >x
|
||||
3 > ] = [1, 2];
|
||||
1 >Emitted(1, 1) Source(2, 6) + SourceIndex(0)
|
||||
2 >Emitted(1, 18) Source(2, 7) + SourceIndex(0)
|
||||
3 >Emitted(1, 19) Source(2, 18) + SourceIndex(0)
|
||||
---
|
||||
>>>var _a = [1, 2], y = _a[0], z = _a[1];
|
||||
1->
|
||||
2 >^^^^
|
||||
3 > ^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^^^^^^
|
||||
6 > ^^
|
||||
7 > ^^^^^^^^^
|
||||
8 > ^
|
||||
9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1->
|
||||
>
|
||||
2 >
|
||||
3 > var [y, z] = [1, 2]
|
||||
4 >
|
||||
5 > y
|
||||
6 > ,
|
||||
7 > z
|
||||
8 > ] = [1, 2];
|
||||
1->Emitted(2, 1) Source(3, 1) + SourceIndex(0)
|
||||
2 >Emitted(2, 5) Source(3, 1) + SourceIndex(0)
|
||||
3 >Emitted(2, 16) Source(3, 20) + SourceIndex(0)
|
||||
4 >Emitted(2, 18) Source(3, 6) + SourceIndex(0)
|
||||
5 >Emitted(2, 27) Source(3, 7) + SourceIndex(0)
|
||||
6 >Emitted(2, 29) Source(3, 9) + SourceIndex(0)
|
||||
7 >Emitted(2, 38) Source(3, 10) + SourceIndex(0)
|
||||
8 >Emitted(2, 39) Source(3, 21) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map
|
|
@ -0,0 +1,9 @@
|
|||
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts ===
|
||||
|
||||
var [x] = [1, 2];
|
||||
>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts, 1, 5))
|
||||
|
||||
var [y, z] = [1, 2];
|
||||
>y : Symbol(y, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts, 2, 5))
|
||||
>z : Symbol(z, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts, 2, 7))
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts ===
|
||||
|
||||
var [x] = [1, 2];
|
||||
>x : number
|
||||
>[1, 2] : [number, number]
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
||||
var [y, z] = [1, 2];
|
||||
>y : number
|
||||
>z : number
|
||||
>[1, 2] : [number, number]
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts]
|
||||
|
||||
var [x = 20] = [1, 2];
|
||||
|
||||
//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js]
|
||||
var _a = [1, 2][0], x = _a === void 0 ? 20 : _a;
|
||||
//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js.map
|
|
@ -0,0 +1,2 @@
|
|||
//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js.map]
|
||||
{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts"],"names":[],"mappings":"AACK,kBAAM,EAAN,2BAAM,CAAW"}
|
|
@ -0,0 +1,30 @@
|
|||
===================================================================
|
||||
JsFile: sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js
|
||||
mapUrl: sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js.map
|
||||
sourceRoot:
|
||||
sources: sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts
|
||||
===================================================================
|
||||
-------------------------------------------------------------------
|
||||
emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js
|
||||
sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>var _a = [1, 2][0], x = _a === void 0 ? 20 : _a;
|
||||
1 >
|
||||
2 >^^^^^^^^^^^^^^^^^^
|
||||
3 > ^^
|
||||
4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
5 > ^
|
||||
6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>var [
|
||||
2 >x = 20
|
||||
3 >
|
||||
4 > x = 20
|
||||
5 > ] = [1, 2];
|
||||
1 >Emitted(1, 1) Source(2, 6) + SourceIndex(0)
|
||||
2 >Emitted(1, 19) Source(2, 12) + SourceIndex(0)
|
||||
3 >Emitted(1, 21) Source(2, 6) + SourceIndex(0)
|
||||
4 >Emitted(1, 48) Source(2, 12) + SourceIndex(0)
|
||||
5 >Emitted(1, 49) Source(2, 23) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js.map
|
|
@ -0,0 +1,5 @@
|
|||
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts ===
|
||||
|
||||
var [x = 20] = [1, 2];
|
||||
>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts, 1, 5))
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.ts ===
|
||||
|
||||
var [x = 20] = [1, 2];
|
||||
>x : number
|
||||
>20 : number
|
||||
>[1, 2] : [number, number]
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts]
|
||||
|
||||
var [x = 20, j] = [1, 2];
|
||||
|
||||
//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js]
|
||||
var _a = [1, 2], _b = _a[0], x = _b === void 0 ? 20 : _b, j = _a[1];
|
||||
//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map
|
|
@ -0,0 +1,2 @@
|
|||
//// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map]
|
||||
{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts"],"names":[],"mappings":"AACA,IAAA,WAAwB,EAAnB,UAAM,EAAN,2BAAM,EAAE,SAAC,CAAW"}
|
|
@ -0,0 +1,45 @@
|
|||
===================================================================
|
||||
JsFile: sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js
|
||||
mapUrl: sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map
|
||||
sourceRoot:
|
||||
sources: sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts
|
||||
===================================================================
|
||||
-------------------------------------------------------------------
|
||||
emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js
|
||||
sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>var _a = [1, 2], _b = _a[0], x = _b === void 0 ? 20 : _b, j = _a[1];
|
||||
1 >
|
||||
2 >^^^^
|
||||
3 > ^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^^^^^^^
|
||||
6 > ^^
|
||||
7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
8 > ^^
|
||||
9 > ^^^^^^^^^
|
||||
10> ^
|
||||
11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>
|
||||
2 >
|
||||
3 > var [x = 20, j] = [1, 2]
|
||||
4 >
|
||||
5 > x = 20
|
||||
6 >
|
||||
7 > x = 20
|
||||
8 > ,
|
||||
9 > j
|
||||
10> ] = [1, 2];
|
||||
1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 5) Source(2, 1) + SourceIndex(0)
|
||||
3 >Emitted(1, 16) Source(2, 25) + SourceIndex(0)
|
||||
4 >Emitted(1, 18) Source(2, 6) + SourceIndex(0)
|
||||
5 >Emitted(1, 28) Source(2, 12) + SourceIndex(0)
|
||||
6 >Emitted(1, 30) Source(2, 6) + SourceIndex(0)
|
||||
7 >Emitted(1, 57) Source(2, 12) + SourceIndex(0)
|
||||
8 >Emitted(1, 59) Source(2, 14) + SourceIndex(0)
|
||||
9 >Emitted(1, 68) Source(2, 15) + SourceIndex(0)
|
||||
10>Emitted(1, 69) Source(2, 26) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map
|
|
@ -0,0 +1,6 @@
|
|||
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts ===
|
||||
|
||||
var [x = 20, j] = [1, 2];
|
||||
>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts, 1, 5))
|
||||
>j : Symbol(j, Decl(sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts, 1, 12))
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts ===
|
||||
|
||||
var [x = 20, j] = [1, 2];
|
||||
>x : number
|
||||
>20 : number
|
||||
>j : number
|
||||
>[1, 2] : [number, number]
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts]
|
||||
|
||||
var {x} = { x: 20 };
|
||||
|
||||
//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js]
|
||||
var x = { x: 20 }.x;
|
||||
//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js.map
|
|
@ -0,0 +1,2 @@
|
|||
//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js.map]
|
||||
{"version":3,"file":"sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts"],"names":[],"mappings":"AACK,mBAAC,CAAc"}
|
|
@ -0,0 +1,24 @@
|
|||
===================================================================
|
||||
JsFile: sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js
|
||||
mapUrl: sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js.map
|
||||
sourceRoot:
|
||||
sources: sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts
|
||||
===================================================================
|
||||
-------------------------------------------------------------------
|
||||
emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js
|
||||
sourceFile:sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>var x = { x: 20 }.x;
|
||||
1 >
|
||||
2 >^^^^^^^^^^^^^^^^^^^
|
||||
3 > ^
|
||||
4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>var {
|
||||
2 >x
|
||||
3 > } = { x: 20 };
|
||||
1 >Emitted(1, 1) Source(2, 6) + SourceIndex(0)
|
||||
2 >Emitted(1, 20) Source(2, 7) + SourceIndex(0)
|
||||
3 >Emitted(1, 21) Source(2, 21) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js.map
|
|
@ -0,0 +1,6 @@
|
|||
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts ===
|
||||
|
||||
var {x} = { x: 20 };
|
||||
>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts, 1, 5))
|
||||
>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts, 1, 11))
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.ts ===
|
||||
|
||||
var {x} = { x: 20 };
|
||||
>x : number
|
||||
>{ x: 20 } : { x: number; }
|
||||
>x : number
|
||||
>20 : number
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts]
|
||||
|
||||
var {x} = { x: 20 };
|
||||
var { a, b } = { a: 30, b: 40 };
|
||||
|
||||
//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js]
|
||||
var x = { x: 20 }.x;
|
||||
var _a = { a: 30, b: 40 }, a = _a.a, b = _a.b;
|
||||
//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map
|
|
@ -0,0 +1,2 @@
|
|||
//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map]
|
||||
{"version":3,"file":"sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts"],"names":[],"mappings":"AACK,mBAAC,CAAc;AACpB,IAAA,qBAA+B,EAAzB,QAAC,EAAE,QAAC,CAAsB"}
|
|
@ -0,0 +1,52 @@
|
|||
===================================================================
|
||||
JsFile: sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js
|
||||
mapUrl: sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map
|
||||
sourceRoot:
|
||||
sources: sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts
|
||||
===================================================================
|
||||
-------------------------------------------------------------------
|
||||
emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js
|
||||
sourceFile:sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>var x = { x: 20 }.x;
|
||||
1 >
|
||||
2 >^^^^^^^^^^^^^^^^^^^
|
||||
3 > ^
|
||||
4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>var {
|
||||
2 >x
|
||||
3 > } = { x: 20 };
|
||||
1 >Emitted(1, 1) Source(2, 6) + SourceIndex(0)
|
||||
2 >Emitted(1, 20) Source(2, 7) + SourceIndex(0)
|
||||
3 >Emitted(1, 21) Source(2, 21) + SourceIndex(0)
|
||||
---
|
||||
>>>var _a = { a: 30, b: 40 }, a = _a.a, b = _a.b;
|
||||
1->
|
||||
2 >^^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^^^^^
|
||||
6 > ^^
|
||||
7 > ^^^^^^^^
|
||||
8 > ^
|
||||
9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1->
|
||||
>
|
||||
2 >
|
||||
3 > var { a, b } = { a: 30, b: 40 }
|
||||
4 >
|
||||
5 > a
|
||||
6 > ,
|
||||
7 > b
|
||||
8 > } = { a: 30, b: 40 };
|
||||
1->Emitted(2, 1) Source(3, 1) + SourceIndex(0)
|
||||
2 >Emitted(2, 5) Source(3, 1) + SourceIndex(0)
|
||||
3 >Emitted(2, 26) Source(3, 32) + SourceIndex(0)
|
||||
4 >Emitted(2, 28) Source(3, 7) + SourceIndex(0)
|
||||
5 >Emitted(2, 36) Source(3, 8) + SourceIndex(0)
|
||||
6 >Emitted(2, 38) Source(3, 10) + SourceIndex(0)
|
||||
7 >Emitted(2, 46) Source(3, 11) + SourceIndex(0)
|
||||
8 >Emitted(2, 47) Source(3, 33) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map
|
|
@ -0,0 +1,12 @@
|
|||
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts ===
|
||||
|
||||
var {x} = { x: 20 };
|
||||
>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts, 1, 5))
|
||||
>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts, 1, 11))
|
||||
|
||||
var { a, b } = { a: 30, b: 40 };
|
||||
>a : Symbol(a, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts, 2, 5))
|
||||
>b : Symbol(b, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts, 2, 8))
|
||||
>a : Symbol(a, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts, 2, 16))
|
||||
>b : Symbol(b, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts, 2, 23))
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts ===
|
||||
|
||||
var {x} = { x: 20 };
|
||||
>x : number
|
||||
>{ x: 20 } : { x: number; }
|
||||
>x : number
|
||||
>20 : number
|
||||
|
||||
var { a, b } = { a: 30, b: 40 };
|
||||
>a : number
|
||||
>b : number
|
||||
>{ a: 30, b: 40 } : { a: number; b: number; }
|
||||
>a : number
|
||||
>30 : number
|
||||
>b : number
|
||||
>40 : number
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts]
|
||||
|
||||
var {x = 500} = { x: 20 };
|
||||
|
||||
//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js]
|
||||
var _a = { x: 20 }.x, x = _a === void 0 ? 500 : _a;
|
||||
//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js.map
|
|
@ -0,0 +1,2 @@
|
|||
//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js.map]
|
||||
{"version":3,"file":"sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts"],"names":[],"mappings":"AACK,oBAAO,EAAP,4BAAO,CAAc"}
|
|
@ -0,0 +1,30 @@
|
|||
===================================================================
|
||||
JsFile: sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js
|
||||
mapUrl: sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js.map
|
||||
sourceRoot:
|
||||
sources: sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts
|
||||
===================================================================
|
||||
-------------------------------------------------------------------
|
||||
emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js
|
||||
sourceFile:sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>var _a = { x: 20 }.x, x = _a === void 0 ? 500 : _a;
|
||||
1 >
|
||||
2 >^^^^^^^^^^^^^^^^^^^^
|
||||
3 > ^^
|
||||
4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
5 > ^
|
||||
6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>var {
|
||||
2 >x = 500
|
||||
3 >
|
||||
4 > x = 500
|
||||
5 > } = { x: 20 };
|
||||
1 >Emitted(1, 1) Source(2, 6) + SourceIndex(0)
|
||||
2 >Emitted(1, 21) Source(2, 13) + SourceIndex(0)
|
||||
3 >Emitted(1, 23) Source(2, 6) + SourceIndex(0)
|
||||
4 >Emitted(1, 51) Source(2, 13) + SourceIndex(0)
|
||||
5 >Emitted(1, 52) Source(2, 27) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js.map
|
|
@ -0,0 +1,6 @@
|
|||
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts ===
|
||||
|
||||
var {x = 500} = { x: 20 };
|
||||
>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts, 1, 5))
|
||||
>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts, 1, 17))
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.ts ===
|
||||
|
||||
var {x = 500} = { x: 20 };
|
||||
>x : number
|
||||
>500 : number
|
||||
>{ x: 20 } : { x?: number; }
|
||||
>x : number
|
||||
>20 : number
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts]
|
||||
|
||||
var {x = 500,
|
||||
y} = { x: 20, y: "hi" };
|
||||
|
||||
//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js]
|
||||
var _a = { x: 20, y: "hi" }, _b = _a.x, x = _b === void 0 ? 500 : _b, y = _a.y;
|
||||
//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map
|
|
@ -0,0 +1,2 @@
|
|||
//// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map]
|
||||
{"version":3,"file":"sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts"],"names":[],"mappings":"AACA,IAAA,uBAC4B,EADvB,SAAO,EAAP,4BAAO,EACP,QAAC,CAAuB"}
|
|
@ -0,0 +1,47 @@
|
|||
===================================================================
|
||||
JsFile: sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js
|
||||
mapUrl: sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map
|
||||
sourceRoot:
|
||||
sources: sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts
|
||||
===================================================================
|
||||
-------------------------------------------------------------------
|
||||
emittedFile:tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js
|
||||
sourceFile:sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts
|
||||
-------------------------------------------------------------------
|
||||
>>>var _a = { x: 20, y: "hi" }, _b = _a.x, x = _b === void 0 ? 500 : _b, y = _a.y;
|
||||
1 >
|
||||
2 >^^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
4 > ^^
|
||||
5 > ^^^^^^^^^
|
||||
6 > ^^
|
||||
7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
8 > ^^
|
||||
9 > ^^^^^^^^
|
||||
10> ^
|
||||
11> ^^^^^^^^^^^^^^^^^^->
|
||||
1 >
|
||||
>
|
||||
2 >
|
||||
3 > var {x = 500,
|
||||
> y} = { x: 20, y: "hi" }
|
||||
4 >
|
||||
5 > x = 500
|
||||
6 >
|
||||
7 > x = 500
|
||||
8 > ,
|
||||
>
|
||||
9 > y
|
||||
10> } = { x: 20, y: "hi" };
|
||||
1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
|
||||
2 >Emitted(1, 5) Source(2, 1) + SourceIndex(0)
|
||||
3 >Emitted(1, 28) Source(3, 29) + SourceIndex(0)
|
||||
4 >Emitted(1, 30) Source(2, 6) + SourceIndex(0)
|
||||
5 >Emitted(1, 39) Source(2, 13) + SourceIndex(0)
|
||||
6 >Emitted(1, 41) Source(2, 6) + SourceIndex(0)
|
||||
7 >Emitted(1, 69) Source(2, 13) + SourceIndex(0)
|
||||
8 >Emitted(1, 71) Source(3, 6) + SourceIndex(0)
|
||||
9 >Emitted(1, 79) Source(3, 7) + SourceIndex(0)
|
||||
10>Emitted(1, 80) Source(3, 30) + SourceIndex(0)
|
||||
---
|
||||
>>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map
|
|
@ -0,0 +1,10 @@
|
|||
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts ===
|
||||
|
||||
var {x = 500,
|
||||
>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts, 1, 5))
|
||||
|
||||
y} = { x: 20, y: "hi" };
|
||||
>y : Symbol(y, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts, 1, 13))
|
||||
>x : Symbol(x, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts, 2, 11))
|
||||
>y : Symbol(y, Decl(sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts, 2, 18))
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
=== tests/cases/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts ===
|
||||
|
||||
var {x = 500,
|
||||
>x : number
|
||||
>500 : number
|
||||
|
||||
y} = { x: 20, y: "hi" };
|
||||
>y : string
|
||||
>{ x: 20, y: "hi" } : { x?: number; y: string; }
|
||||
>x : number
|
||||
>20 : number
|
||||
>y : string
|
||||
>"hi" : string
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
// @sourcemap: true
|
||||
|
||||
var [x] = [1, 2];
|
|
@ -0,0 +1,4 @@
|
|||
// @sourcemap: true
|
||||
|
||||
var [x] = [1, 2];
|
||||
var [y, z] = [1, 2];
|
|
@ -0,0 +1,3 @@
|
|||
// @sourcemap: true
|
||||
|
||||
var [x = 20] = [1, 2];
|
|
@ -0,0 +1,3 @@
|
|||
// @sourcemap: true
|
||||
|
||||
var [x = 20, j] = [1, 2];
|
|
@ -0,0 +1,3 @@
|
|||
// @sourcemap: true
|
||||
|
||||
var {x} = { x: 20 };
|
|
@ -0,0 +1,4 @@
|
|||
// @sourcemap: true
|
||||
|
||||
var {x} = { x: 20 };
|
||||
var { a, b } = { a: 30, b: 40 };
|
|
@ -0,0 +1,3 @@
|
|||
// @sourcemap: true
|
||||
|
||||
var {x = 500} = { x: 20 };
|
|
@ -0,0 +1,4 @@
|
|||
// @sourcemap: true
|
||||
|
||||
var {x = 500,
|
||||
y} = { x: 20, y: "hi" };
|
Loading…
Reference in a new issue