From 9d880977b2c728611321c65156e63d9f26fdde9f Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Wed, 11 Apr 2018 14:19:09 -0700 Subject: [PATCH 1/5] Remove duplicate function createTextRange --- src/compiler/transformers/es2015.ts | 6 +++--- src/compiler/utilities.ts | 13 ++++--------- src/services/textChanges.ts | 14 +++++++------- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 72068688f9d63..f4537ec6ac989 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -1874,7 +1874,7 @@ namespace ts { // for the statement list we synthesize when we down-level an arrow function with // an expression function body. This prevents both comments and source maps from // being emitted for the end position only. - statementsLocation = moveRangeEnd(body, -1); + statementsLocation = moveRangeEnd(body, -1, /*noAssert*/ true); const equalsGreaterThanToken = (node).equalsGreaterThanToken; if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { @@ -2328,7 +2328,7 @@ namespace ts { node.initializer ) ), - moveRangeEnd(node.initializer, -1) + moveRangeEnd(node.initializer, -1, /*noAssert*/ true) ) ); } @@ -2343,7 +2343,7 @@ namespace ts { } else { assignment.end = node.initializer.end; - statements.push(setTextRange(createStatement(visitNode(assignment, visitor, isExpression)), moveRangeEnd(node.initializer, -1))); + statements.push(setTextRange(createStatement(visitNode(assignment, visitor, isExpression)), moveRangeEnd(node.initializer, -1, /*noAssert*/ true))); } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index aceb447eff519..4261617168372 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -3686,7 +3686,8 @@ namespace ts { * @param pos The start position. * @param end The end position. */ - export function createRange(pos: number, end: number): TextRange { + export function createRange(pos: number, end: number = pos, noAssert = false): TextRange { + Debug.assert(noAssert || end >= pos); return { pos, end }; } @@ -3696,8 +3697,8 @@ namespace ts { * @param range A TextRange. * @param end The new end position. */ - export function moveRangeEnd(range: TextRange, end: number): TextRange { - return createRange(range.pos, end); + export function moveRangeEnd(range: TextRange, end: number, noAssert = false): TextRange { + return createRange(range.pos, end, noAssert); } /** @@ -4111,12 +4112,6 @@ namespace ts { return { start, length }; } - /* @internal */ - export function createTextRange(pos: number, end: number = pos): TextRange { - Debug.assert(end >= pos); - return { pos, end }; - } - export function createTextSpanFromBounds(start: number, end: number) { return createTextSpan(start, end - start); } diff --git a/src/services/textChanges.ts b/src/services/textChanges.ts index 979c44b2cd7f1..c4f82045642f3 100644 --- a/src/services/textChanges.ts +++ b/src/services/textChanges.ts @@ -323,7 +323,7 @@ namespace ts.textChanges { } private insertNodeAt(sourceFile: SourceFile, pos: number, newNode: Node, options: InsertNodeOptions = {}) { - this.replaceRange(sourceFile, createTextRange(pos), newNode, options); + this.replaceRange(sourceFile, createRange(pos), newNode, options); } private insertNodesAt(sourceFile: SourceFile, pos: number, newNodes: ReadonlyArray, options: InsertNodeOptions = {}): void { @@ -457,11 +457,11 @@ namespace ts.textChanges { // check if previous statement ends with semicolon // if not - insert semicolon to preserve the code from changing the meaning due to ASI if (sourceFile.text.charCodeAt(after.end - 1) !== CharacterCodes.semicolon) { - this.replaceRange(sourceFile, createTextRange(after.end), createToken(SyntaxKind.SemicolonToken)); + this.replaceRange(sourceFile, createRange(after.end), createToken(SyntaxKind.SemicolonToken)); } } const endPosition = getAdjustedEndPosition(sourceFile, after, {}); - return this.replaceRange(sourceFile, createTextRange(endPosition), newNode, this.getInsertNodeAfterOptions(after)); + return this.replaceRange(sourceFile, createRange(endPosition), newNode, this.getInsertNodeAfterOptions(after)); } private getInsertNodeAfterOptions(node: Node): InsertNodeOptions { @@ -550,7 +550,7 @@ namespace ts.textChanges { // write separator and leading trivia of the next element as suffix const suffix = `${tokenToString(nextToken.kind)}${sourceFile.text.substring(nextToken.end, containingList[index + 1].getStart(sourceFile))}`; - this.replaceRange(sourceFile, createTextRange(startPos, containingList[index + 1].getStart(sourceFile)), newNode, { prefix, suffix }); + this.replaceRange(sourceFile, createRange(startPos, containingList[index + 1].getStart(sourceFile)), newNode, { prefix, suffix }); } } else { @@ -584,7 +584,7 @@ namespace ts.textChanges { } if (multilineList) { // insert separator immediately following the 'after' node to preserve comments in trailing trivia - this.replaceRange(sourceFile, createTextRange(end), createToken(separator)); + this.replaceRange(sourceFile, createRange(end), createToken(separator)); // use the same indentation as 'after' item const indentation = formatting.SmartIndenter.findFirstNonWhitespaceColumn(afterStartLinePosition, afterStart, sourceFile, this.formatContext.options); // insert element before the line break on the line that contains 'after' element @@ -592,10 +592,10 @@ namespace ts.textChanges { if (insertPos !== end && isLineBreak(sourceFile.text.charCodeAt(insertPos - 1))) { insertPos--; } - this.replaceRange(sourceFile, createTextRange(insertPos), newNode, { indentation, prefix: this.newLineCharacter }); + this.replaceRange(sourceFile, createRange(insertPos), newNode, { indentation, prefix: this.newLineCharacter }); } else { - this.replaceRange(sourceFile, createTextRange(end), newNode, { prefix: `${tokenToString(separator)} ` }); + this.replaceRange(sourceFile, createRange(end), newNode, { prefix: `${tokenToString(separator)} ` }); } } return this; From 301288bf7e9877cb34ceb33525789397bea646f5 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Thu, 12 Apr 2018 08:04:52 -0700 Subject: [PATCH 2/5] Always allow end=-1 --- src/compiler/transformers/es2015.ts | 6 +++--- src/compiler/utilities.ts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index f4537ec6ac989..72068688f9d63 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -1874,7 +1874,7 @@ namespace ts { // for the statement list we synthesize when we down-level an arrow function with // an expression function body. This prevents both comments and source maps from // being emitted for the end position only. - statementsLocation = moveRangeEnd(body, -1, /*noAssert*/ true); + statementsLocation = moveRangeEnd(body, -1); const equalsGreaterThanToken = (node).equalsGreaterThanToken; if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { @@ -2328,7 +2328,7 @@ namespace ts { node.initializer ) ), - moveRangeEnd(node.initializer, -1, /*noAssert*/ true) + moveRangeEnd(node.initializer, -1) ) ); } @@ -2343,7 +2343,7 @@ namespace ts { } else { assignment.end = node.initializer.end; - statements.push(setTextRange(createStatement(visitNode(assignment, visitor, isExpression)), moveRangeEnd(node.initializer, -1, /*noAssert*/ true))); + statements.push(setTextRange(createStatement(visitNode(assignment, visitor, isExpression)), moveRangeEnd(node.initializer, -1))); } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 4261617168372..9d1882146579c 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -3686,8 +3686,8 @@ namespace ts { * @param pos The start position. * @param end The end position. */ - export function createRange(pos: number, end: number = pos, noAssert = false): TextRange { - Debug.assert(noAssert || end >= pos); + export function createRange(pos: number, end: number = pos): TextRange { + Debug.assert(end >= pos || end === -1); return { pos, end }; } @@ -3697,8 +3697,8 @@ namespace ts { * @param range A TextRange. * @param end The new end position. */ - export function moveRangeEnd(range: TextRange, end: number, noAssert = false): TextRange { - return createRange(range.pos, end, noAssert); + export function moveRangeEnd(range: TextRange, end: number): TextRange { + return createRange(range.pos, end); } /** From 300500bb49191e74357060987ec4882d48878d7e Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Thu, 12 Apr 2018 09:15:15 -0700 Subject: [PATCH 3/5] Put noAssert back, pending #23370 --- src/compiler/transformers/es2015.ts | 2 +- src/compiler/utilities.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 72068688f9d63..8c0de9c8f737e 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -2075,7 +2075,7 @@ namespace ts { const firstDeclaration = firstOrUndefined(declarations); if (firstDeclaration) { const lastDeclaration = lastOrUndefined(declarations); - setSourceMapRange(declarationList, createRange(firstDeclaration.pos, lastDeclaration.end)); + setSourceMapRange(declarationList, createRange(firstDeclaration.pos, lastDeclaration.end, /*noAssert*/ true)); // TODO: GH#23370 } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 9d1882146579c..9c065be55f4bb 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -3686,8 +3686,8 @@ namespace ts { * @param pos The start position. * @param end The end position. */ - export function createRange(pos: number, end: number = pos): TextRange { - Debug.assert(end >= pos || end === -1); + export function createRange(pos: number, end: number = pos, noAssert?: boolean): TextRange { + Debug.assert(end >= pos || end === -1 || noAssert); // TODO: GH#23370 return { pos, end }; } From 01c9052cef9d89f0b2633f6012505e119776d894 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Wed, 2 May 2018 11:37:51 -0700 Subject: [PATCH 4/5] Use getRangeUnion helper --- src/compiler/transformers/es2015.ts | 23 ++++++++++++------- src/compiler/utilities.ts | 4 ++-- src/services/getEditsForFileRename.ts | 2 +- src/services/textChanges.ts | 4 ++-- ...ationDestructuringVariableStatement.js.map | 2 +- ...structuringVariableStatement.sourcemap.txt | 6 ++--- ...tionDestructuringVariableStatement1.js.map | 2 +- ...tructuringVariableStatement1.sourcemap.txt | 6 ++--- ...ariableStatementArrayBindingPattern.js.map | 2 +- ...StatementArrayBindingPattern.sourcemap.txt | 6 ++--- ...riableStatementArrayBindingPattern2.js.map | 2 +- ...tatementArrayBindingPattern2.sourcemap.txt | 12 +++++----- ...riableStatementArrayBindingPattern5.js.map | 2 +- ...tatementArrayBindingPattern5.sourcemap.txt | 6 ++--- ...riableStatementArrayBindingPattern7.js.map | 2 +- ...tatementArrayBindingPattern7.sourcemap.txt | 6 ++--- ...entArrayBindingPatternDefaultValues.js.map | 2 +- ...yBindingPatternDefaultValues.sourcemap.txt | 6 ++--- ...ntArrayBindingPatternDefaultValues2.js.map | 2 +- ...BindingPatternDefaultValues2.sourcemap.txt | 12 +++++----- ...uringVariableStatementDefaultValues.js.map | 2 +- ...riableStatementDefaultValues.sourcemap.txt | 6 ++--- ...StatementNestedObjectBindingPattern.js.map | 2 +- ...ntNestedObjectBindingPattern.sourcemap.txt | 18 +++++++-------- ...jectBindingPatternWithDefaultValues.js.map | 2 +- ...dingPatternWithDefaultValues.sourcemap.txt | 22 +++++++++--------- ...iableStatementObjectBindingPattern2.js.map | 2 +- ...atementObjectBindingPattern2.sourcemap.txt | 6 ++--- ...iableStatementObjectBindingPattern4.js.map | 2 +- ...atementObjectBindingPattern4.sourcemap.txt | 6 ++--- 30 files changed, 92 insertions(+), 85 deletions(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index d58d834b1c2d3..412934dc0256a 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -2064,15 +2064,11 @@ namespace ts { setTextRange(declarationList, node); setCommentRange(declarationList, node); + // If the first or last declaration is a binding pattern, we need to modify + // the source map range for the declaration list. if (node.transformFlags & TransformFlags.ContainsBindingPattern - && (isBindingPattern(node.declarations[0].name) || isBindingPattern(lastOrUndefined(node.declarations).name))) { - // If the first or last declaration is a binding pattern, we need to modify - // the source map range for the declaration list. - const firstDeclaration = firstOrUndefined(declarations); - if (firstDeclaration) { - const lastDeclaration = lastOrUndefined(declarations); - setSourceMapRange(declarationList, createRange(firstDeclaration.pos, lastDeclaration.end, /*noAssert*/ true)); // TODO: GH#23370 - } + && (isBindingPattern(node.declarations[0].name) || isBindingPattern(last(node.declarations).name))) { + setSourceMapRange(declarationList, getRangeUnion(declarations)); } return declarationList; @@ -2080,6 +2076,17 @@ namespace ts { return visitEachChild(node, visitor, context); } + function getRangeUnion(declarations: ReadonlyArray): TextRange { + // declarations may not be sorted by position. + // pos should be the minimum* position over all nodes (that's not -1), end should be the maximum end over all nodes. + let pos = -1, end = -1; + for (const node of declarations) { + pos = pos === -1 ? node.pos : node.pos === -1 ? pos : Math.min(pos, node.pos); + end = Math.max(end, node.end); + } + return createRange(pos, end); + } + /** * Gets a value indicating whether we should emit an explicit initializer for a variable * declaration in a `let` declaration list. diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 02db6d8025f9b..2b4e1b960a26d 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -3697,8 +3697,8 @@ namespace ts { * @param pos The start position. * @param end The end position. */ - export function createRange(pos: number, end: number = pos, noAssert?: boolean): TextRange { - Debug.assert(end >= pos || end === -1 || noAssert); // TODO: GH#23370 + export function createRange(pos: number, end: number = pos): TextRange { + Debug.assert(end >= pos || end === -1); return { pos, end }; } diff --git a/src/services/getEditsForFileRename.ts b/src/services/getEditsForFileRename.ts index 09bbdc11e7890..e8bb1f8652a0d 100644 --- a/src/services/getEditsForFileRename.ts +++ b/src/services/getEditsForFileRename.ts @@ -71,6 +71,6 @@ namespace ts { } function createStringRange(node: StringLiteralLike, sourceFile: SourceFileLike): TextRange { - return createTextRange(node.getStart(sourceFile) + 1, node.end - 1); + return createRange(node.getStart(sourceFile) + 1, node.end - 1); } } diff --git a/src/services/textChanges.ts b/src/services/textChanges.ts index 13f431da43284..89ee8199c91db 100644 --- a/src/services/textChanges.ts +++ b/src/services/textChanges.ts @@ -368,7 +368,7 @@ namespace ts.textChanges { } private insertText(sourceFile: SourceFile, pos: number, text: string): void { - this.replaceRangeWithText(sourceFile, createTextRange(pos), text); + this.replaceRangeWithText(sourceFile, createRange(pos), text); } /** Prefer this over replacing a node with another that has a type annotation, as it avoids reformatting the other parts of the node. */ @@ -641,7 +641,7 @@ namespace ts.textChanges { const [openBraceEnd, closeBraceEnd] = getClassBraceEnds(cls, sourceFile); // For `class C { }` remove the whitespace inside the braces. if (positionsAreOnSameLine(openBraceEnd, closeBraceEnd, sourceFile) && openBraceEnd !== closeBraceEnd - 1) { - this.deleteRange(sourceFile, createTextRange(openBraceEnd, closeBraceEnd - 1)); + this.deleteRange(sourceFile, createRange(openBraceEnd, closeBraceEnd - 1)); } }); } diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js.map index 0dff86fd1d45e..1f97726f1a7ca 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringVariableStatement.js.map] -{"version":3,"file":"sourceMapValidationDestructuringVariableStatement.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatement.ts"],"names":[],"mappings":"AAOA,IAAI,KAAK,GAAG,OAAO,CAAC;AACpB,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACvD,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AACrD,IAAA,mBAAW,CAAY;AACvB,IAAA,mBAAW,EAAE,qBAAa,CAAY;AACxC,IAAA,8CAA0E,EAAxE,eAAW,EAAE,iBAAa,CAA+C;AAC/E,IAAI,KAAK,IAAI,KAAK,EAAE;IAChB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;CACvB;KACI;IACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringVariableStatement.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatement.ts"],"names":[],"mappings":"AAOA,IAAI,KAAK,GAAG,OAAO,CAAC;AACpB,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACvD,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AACrD,IAAA,mBAAW,CAAY;AACvB,IAAA,mBAAW,EAAE,qBAAa,CAAY;AACxC,IAAA,8CAA0E,EAAxE,eAAW,EAAE,iBAA2D,CAAC;AAC/E,IAAI,KAAK,IAAI,KAAK,EAAE;IAChB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;CACvB;KACI;IACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt index c00af2dfdbc32..5ff8c099993ce 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement.sourcemap.txt @@ -181,15 +181,15 @@ sourceFile:sourceMapValidationDestructuringVariableStatement.ts 4 > 5 > name: nameC 6 > , -7 > skill: skillC -8 > } = { name: "Edger", skill: "cutting edges" }; +7 > skill: skillC } = { name: "Edger", skill: "cutting edges" } +8 > ; 1->Emitted(6, 1) Source(13, 5) + SourceIndex(0) 2 >Emitted(6, 5) Source(13, 5) + SourceIndex(0) 3 >Emitted(6, 51) Source(13, 79) + SourceIndex(0) 4 >Emitted(6, 53) Source(13, 7) + SourceIndex(0) 5 >Emitted(6, 68) Source(13, 18) + SourceIndex(0) 6 >Emitted(6, 70) Source(13, 20) + SourceIndex(0) -7 >Emitted(6, 87) Source(13, 33) + SourceIndex(0) +7 >Emitted(6, 87) Source(13, 79) + SourceIndex(0) 8 >Emitted(6, 88) Source(13, 80) + SourceIndex(0) --- >>>if (nameA == nameB) { diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.js.map index 5b9c754af1b79..76680cf4481ff 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringVariableStatement1.js.map] -{"version":3,"file":"sourceMapValidationDestructuringVariableStatement1.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatement1.ts"],"names":[],"mappings":"AAOA,IAAI,KAAK,GAAG,OAAO,CAAC;AACpB,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACvD,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AACvD,IAAA,CAAS,EAAI,mBAAW,CAAY;AACpC,IAAA,CAAS,EAAI,mBAAW,EAAE,qBAAa,CAAY;AACnD,IAAA,CAAS,EAAE,8CAA0E,EAAxE,eAAW,EAAE,iBAAa,CAA+C;AAEpF,IAAA,mBAAW,EAAa,CAAC,GAAG,KAAK,CAAC;AAClC,IAAA,mBAAW,EAAE,qBAAa,EAAa,CAAC,GAAG,QAAQ,CAAC;AACtD,IAAA,8CAA0E,EAAxE,eAAW,EAAE,iBAAa,EAAgD,CAAC,GAAG,KAAK,CAAC;AAE1F,IAAI,CAAC,GAAG,KAAK,EAAI,mBAAW,EAAa,EAAE,GAAE,OAAO,CAAC;AACrD,IAAI,CAAC,GAAG,KAAK,EAAI,mBAAW,EAAE,qBAAa,EAAa,EAAE,GAAG,OAAO,CAAC;AACrE,IAAI,CAAC,GAAG,KAAK,EAAE,8CAA0E,EAAxE,eAAW,EAAE,iBAAa,EAAgD,EAAE,GAAG,KAAK,CAAC;AACtG,IAAI,KAAK,IAAI,KAAK,EAAE;IAChB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;CACvB;KACI;IACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringVariableStatement1.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatement1.ts"],"names":[],"mappings":"AAOA,IAAI,KAAK,GAAG,OAAO,CAAC;AACpB,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACvD,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AACvD,IAAA,CAAS,EAAI,mBAAW,CAAY;AACpC,IAAA,CAAS,EAAI,mBAAW,EAAE,qBAAa,CAAY;AACnD,IAAA,CAAS,EAAE,8CAA0E,EAAxE,eAAW,EAAE,iBAA2D,CAAC;AAEpF,IAAA,mBAAW,EAAa,CAAC,GAAG,KAAK,CAAC;AAClC,IAAA,mBAAW,EAAE,qBAAa,EAAa,CAAC,GAAG,QAAQ,CAAC;AACtD,IAAA,8CAA0E,EAAxE,eAAW,EAAE,iBAAa,EAAgD,CAAC,GAAG,KAAK,CAAC;AAE1F,IAAI,CAAC,GAAG,KAAK,EAAI,mBAAW,EAAa,EAAE,GAAE,OAAO,CAAC;AACrD,IAAI,CAAC,GAAG,KAAK,EAAI,mBAAW,EAAE,qBAAa,EAAa,EAAE,GAAG,OAAO,CAAC;AACrE,IAAI,CAAC,GAAG,KAAK,EAAE,8CAA0E,EAAxE,eAAW,EAAE,iBAAa,EAAgD,EAAE,GAAG,KAAK,CAAC;AACtG,IAAI,KAAK,IAAI,KAAK,EAAE;IAChB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;CACvB;KACI;IACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.sourcemap.txt index 16a63b61c3439..bddfdd1c4d211 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatement1.sourcemap.txt @@ -197,8 +197,8 @@ sourceFile:sourceMapValidationDestructuringVariableStatement1.ts 6 > 7 > name: nameC 8 > , -9 > skill: skillC -10> } = { name: "Edger", skill: "cutting edges" }; +9 > skill: skillC } = { name: "Edger", skill: "cutting edges" } +10> ; 1->Emitted(6, 1) Source(13, 5) + SourceIndex(0) 2 >Emitted(6, 5) Source(13, 5) + SourceIndex(0) 3 >Emitted(6, 6) Source(13, 14) + SourceIndex(0) @@ -207,7 +207,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatement1.ts 6 >Emitted(6, 56) Source(13, 18) + SourceIndex(0) 7 >Emitted(6, 71) Source(13, 29) + SourceIndex(0) 8 >Emitted(6, 73) Source(13, 31) + SourceIndex(0) -9 >Emitted(6, 90) Source(13, 44) + SourceIndex(0) +9 >Emitted(6, 90) Source(13, 90) + SourceIndex(0) 10>Emitted(6, 91) Source(13, 91) + SourceIndex(0) --- >>>var nameA = robotA.name, a = hello; diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map index 919575fe39315..d619484eefe51 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAGxC,IAAA,iBAAK,CAAW;AAClB,IAAA,mBAAO,CAAW;AAClB,IAAA,oBAAQ,EAAE,kBAAM,EAAE,mBAAO,CAAW;AAEpC,IAAA,6CAAQ,CAAoC;AAC7C,IAAA,oCAA0D,EAAzD,eAAO,EAAE,aAAK,EAAE,cAAM,CAAoC;AAE1D,IAAA,oBAAQ,EAAE,4BAAa,CAAW;AAEvC,IAAI,KAAK,IAAI,MAAM,EAAE;IACjB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;CACxB"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAGxC,IAAA,iBAAK,CAAW;AAClB,IAAA,mBAAO,CAAW;AAClB,IAAA,oBAAQ,EAAE,kBAAM,EAAE,mBAAO,CAAW;AAEpC,IAAA,6CAAQ,CAAoC;AAC7C,IAAA,oCAA0D,EAAzD,eAAO,EAAE,aAAK,EAAE,cAAyC,CAAC;AAE1D,IAAA,oBAAQ,EAAE,4BAAa,CAAW;AAEvC,IAAI,KAAK,IAAI,MAAM,EAAE;IACjB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;CACxB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt index da763a77037d0..308e55de910e0 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt @@ -188,8 +188,8 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern. 6 > , 7 > nameC 8 > , -9 > skillC -10> ] = [3, "edging", "Trimming edges"]; +9 > skillC] = [3, "edging", "Trimming edges"] +10> ; 1->Emitted(7, 1) Source(14, 5) + SourceIndex(0) 2 >Emitted(7, 5) Source(14, 5) + SourceIndex(0) 3 >Emitted(7, 41) Source(14, 63) + SourceIndex(0) @@ -198,7 +198,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern. 6 >Emitted(7, 60) Source(14, 15) + SourceIndex(0) 7 >Emitted(7, 73) Source(14, 20) + SourceIndex(0) 8 >Emitted(7, 75) Source(14, 22) + SourceIndex(0) -9 >Emitted(7, 89) Source(14, 28) + SourceIndex(0) +9 >Emitted(7, 89) Source(14, 63) + SourceIndex(0) 10>Emitted(7, 90) Source(14, 64) + SourceIndex(0) --- >>>var numberA3 = robotA[0], robotAInfo = robotA.slice(1); diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map index f33092aef99d7..59de11c1256e4 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map] -{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts"],"names":[],"mappings":"AAIA,IAAI,WAAW,GAAsB,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/D,IAAI,WAAW,GAAsB,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAElE,IAAA,uBAAM,CAAgB;AACxB,IAAA,uBAAM,CAAgB;AACtB,IAAA,uBAAM,EAAE,mBAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAiB;AAExD,IAAA,6CAAM,CAAsC;AAC7C,IAAA,sCAA+E,EAA9E,eAAO,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAe,CAAuC;AAE/E,IAAA,sCAAkB,CAAgB;AAEvC,IAAI,MAAM,IAAI,MAAM,EAAE;IAClB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CACtC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.ts"],"names":[],"mappings":"AAIA,IAAI,WAAW,GAAsB,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/D,IAAI,WAAW,GAAsB,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAElE,IAAA,uBAAM,CAAgB;AACxB,IAAA,uBAAM,CAAgB;AACtB,IAAA,uBAAM,EAAE,mBAAgC,EAA/B,qBAAa,EAAE,uBAAgB,CAAgB;AAExD,IAAA,6CAAM,CAAsC;AAC7C,IAAA,sCAA+E,EAA9E,eAAO,EAAE,UAAgC,EAA/B,qBAAa,EAAE,uBAAqD,CAAC;AAE/E,IAAA,sCAAkB,CAAgB;AAEvC,IAAI,MAAM,IAAI,MAAM,EAAE;IAClB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CACtC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt index d445ea559c9af..12f78509a8e28 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt @@ -155,8 +155,8 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern2 6 > 7 > primarySkillA 8 > , -9 > secondarySkillA -10> ]] = multiRobotA; +9 > secondarySkillA] +10> ] = multiRobotA; 1->Emitted(5, 1) Source(10, 6) + SourceIndex(0) 2 >Emitted(5, 5) Source(10, 6) + SourceIndex(0) 3 >Emitted(5, 28) Source(10, 12) + SourceIndex(0) @@ -165,7 +165,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern2 6 >Emitted(5, 51) Source(10, 15) + SourceIndex(0) 7 >Emitted(5, 72) Source(10, 28) + SourceIndex(0) 8 >Emitted(5, 74) Source(10, 30) + SourceIndex(0) -9 >Emitted(5, 97) Source(10, 45) + SourceIndex(0) +9 >Emitted(5, 97) Source(10, 46) + SourceIndex(0) 10>Emitted(5, 98) Source(10, 62) + SourceIndex(0) --- >>>var nameMC = ["roomba", ["vaccum", "mopping"]][0]; @@ -209,8 +209,8 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern2 8 > 9 > primarySkillC 10> , -11> secondarySkillC -12> ]] = ["roomba", ["vaccum", "mopping"]]; +11> secondarySkillC]] = ["roomba", ["vaccum", "mopping"]] +12> ; 1->Emitted(7, 1) Source(13, 5) + SourceIndex(0) 2 >Emitted(7, 5) Source(13, 5) + SourceIndex(0) 3 >Emitted(7, 43) Source(13, 84) + SourceIndex(0) @@ -221,7 +221,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern2 8 >Emitted(7, 74) Source(13, 16) + SourceIndex(0) 9 >Emitted(7, 95) Source(13, 29) + SourceIndex(0) 10>Emitted(7, 97) Source(13, 31) + SourceIndex(0) -11>Emitted(7, 120) Source(13, 46) + SourceIndex(0) +11>Emitted(7, 120) Source(13, 84) + SourceIndex(0) 12>Emitted(7, 121) Source(13, 85) + SourceIndex(0) --- >>>var multiRobotAInfo = multiRobotA.slice(0); diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map index 456a64e7f34c2..96ea969b41a04 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map] -{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts"],"names":[],"mappings":"AAAK,IAAA,aAAC,CAAW;AACb,IAAA,WAAe,EAAd,SAAC,EAAE,SAAC,CAAW"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.ts"],"names":[],"mappings":"AAAK,IAAA,aAAC,CAAW;AACb,IAAA,WAAe,EAAd,SAAC,EAAE,SAAW,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.sourcemap.txt index 2603b53c456fa..834b62af3101b 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.sourcemap.txt @@ -40,15 +40,15 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern5 4 > 5 > y 6 > , -7 > z -8 > ] = [1, 2]; +7 > z] = [1, 2] +8 > ; 1->Emitted(2, 1) Source(2, 5) + SourceIndex(0) 2 >Emitted(2, 5) Source(2, 5) + SourceIndex(0) 3 >Emitted(2, 16) Source(2, 20) + SourceIndex(0) 4 >Emitted(2, 18) Source(2, 6) + SourceIndex(0) 5 >Emitted(2, 27) Source(2, 7) + SourceIndex(0) 6 >Emitted(2, 29) Source(2, 9) + SourceIndex(0) -7 >Emitted(2, 38) Source(2, 10) + SourceIndex(0) +7 >Emitted(2, 38) Source(2, 20) + SourceIndex(0) 8 >Emitted(2, 39) Source(2, 21) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map index 94422f7614540..0b43806d51796 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map] -{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts"],"names":[],"mappings":"AAAI,IAAA,WAAoB,EAAnB,UAAM,EAAN,2BAAM,EAAE,SAAC,CAAW"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.ts"],"names":[],"mappings":"AAAI,IAAA,WAAoB,EAAnB,UAAM,EAAN,2BAAM,EAAE,SAAW,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.sourcemap.txt index 2a088a1dc8287..db14204bda721 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.sourcemap.txt @@ -28,8 +28,8 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern7 6 > 7 > x = 20 8 > , -9 > j -10> ] = [1, 2]; +9 > j] = [1, 2] +10> ; 1 >Emitted(1, 1) Source(1, 5) + SourceIndex(0) 2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) 3 >Emitted(1, 16) Source(1, 25) + SourceIndex(0) @@ -38,7 +38,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPattern7 6 >Emitted(1, 30) Source(1, 6) + SourceIndex(0) 7 >Emitted(1, 57) Source(1, 12) + SourceIndex(0) 8 >Emitted(1, 59) Source(1, 14) + SourceIndex(0) -9 >Emitted(1, 68) Source(1, 15) + SourceIndex(0) +9 >Emitted(1, 68) Source(1, 25) + SourceIndex(0) 10>Emitted(1, 69) Source(1, 26) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js.map index a35c7f2596f85..ec1321b8a9166 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js.map] -{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAExC,IAAA,cAAgB,EAAhB,qCAAgB,CAAW;AAC7B,IAAA,cAAY,EAAZ,iCAAY,CAAW;AACvB,IAAA,cAAa,EAAb,kCAAa,EAAE,cAAiB,EAAjB,sCAAiB,EAAE,cAAmB,EAAnB,wCAAmB,CAAW;AAEhE,IAAA,uCAAa,EAAb,kCAAa,CAAoC;AAClD,IAAA,oCAAsF,EAArF,UAAY,EAAZ,iCAAY,EAAE,UAAgB,EAAhB,qCAAgB,EAAE,UAAkB,EAAlB,uCAAkB,CAAoC;AAEtF,IAAA,cAAa,EAAb,kCAAa,EAAE,4BAAa,CAAW;AAE5C,IAAI,KAAK,IAAI,MAAM,EAAE;IACjB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;CACxB"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.ts"],"names":[],"mappings":"AAIA,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAU,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAExC,IAAA,cAAgB,EAAhB,qCAAgB,CAAW;AAC7B,IAAA,cAAY,EAAZ,iCAAY,CAAW;AACvB,IAAA,cAAa,EAAb,kCAAa,EAAE,cAAiB,EAAjB,sCAAiB,EAAE,cAAmB,EAAnB,wCAAmB,CAAW;AAEhE,IAAA,uCAAa,EAAb,kCAAa,CAAoC;AAClD,IAAA,oCAAsF,EAArF,UAAY,EAAZ,iCAAY,EAAE,UAAgB,EAAhB,qCAAgB,EAAE,UAAkB,EAAlB,uCAAqD,CAAC;AAEtF,IAAA,cAAa,EAAb,kCAAa,EAAE,4BAAa,CAAW;AAE5C,IAAI,KAAK,IAAI,MAAM,EAAE;IACjB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;CACxB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.sourcemap.txt index dfa51e18e6e22..32db2f848c096 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.sourcemap.txt @@ -235,8 +235,8 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPatternD 12> , 13> skillC = "noSkill" 14> -15> skillC = "noSkill" -16> ] = [3, "edging", "Trimming edges"]; +15> skillC = "noSkill"] = [3, "edging", "Trimming edges"] +16> ; 1->Emitted(7, 1) Source(13, 5) + SourceIndex(0) 2 >Emitted(7, 5) Source(13, 5) + SourceIndex(0) 3 >Emitted(7, 41) Source(13, 91) + SourceIndex(0) @@ -251,7 +251,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPatternD 12>Emitted(7, 141) Source(13, 38) + SourceIndex(0) 13>Emitted(7, 151) Source(13, 56) + SourceIndex(0) 14>Emitted(7, 153) Source(13, 38) + SourceIndex(0) -15>Emitted(7, 192) Source(13, 56) + SourceIndex(0) +15>Emitted(7, 192) Source(13, 91) + SourceIndex(0) 16>Emitted(7, 193) Source(13, 92) + SourceIndex(0) --- >>>var _l = robotA[0], numberA3 = _l === void 0 ? -1 : _l, robotAInfo = robotA.slice(1); diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js.map index 844b6f3169f4c..1a6d2dd6a672d 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js.map] -{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts"],"names":[],"mappings":"AAIA,IAAI,WAAW,GAAsB,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/D,IAAI,WAAW,GAAsB,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAElE,IAAA,mBAA+B,EAA/B,oDAA+B,CAAgB;AACjD,IAAA,mBAAiB,EAAjB,sCAAiB,CAAiB;AAClC,IAAA,mBAAiB,EAAjB,sCAAiB,EAAE,mBAAiF,EAAjF,gDAAiF,EAAhF,UAAyB,EAAzB,8CAAyB,EAAE,UAA2B,EAA3B,gDAA2B,CAA0C;AAEpH,IAAA,yCAAiB,EAAjB,sCAAiB,CAAuC;AACzD,IAAA,sCAA2I,EAA1I,UAAkB,EAAlB,uCAAkB,EAAE,UAAiF,EAAjF,gDAAiF,EAAhF,UAAyB,EAAzB,8CAAyB,EAAE,UAA2B,EAA3B,gDAA2B,CAAgE;AAEhJ,IAAI,MAAM,IAAI,MAAM,EAAE;IAClB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CACtC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.ts"],"names":[],"mappings":"AAIA,IAAI,WAAW,GAAsB,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/D,IAAI,WAAW,GAAsB,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAElE,IAAA,mBAA+B,EAA/B,oDAA+B,CAAgB;AACjD,IAAA,mBAAiB,EAAjB,sCAAiB,CAAiB;AAClC,IAAA,mBAAiB,EAAjB,sCAAiB,EAAE,mBAAiF,EAAjF,gDAAiF,EAAhF,UAAyB,EAAzB,8CAAyB,EAAE,UAA2B,EAA3B,gDAAqD,CAAgB;AAEpH,IAAA,yCAAiB,EAAjB,sCAAiB,CAAuC;AACzD,IAAA,sCAA2I,EAA1I,UAAkB,EAAlB,uCAAkB,EAAE,UAAiF,EAAjF,gDAAiF,EAAhF,UAAyB,EAAzB,8CAAyB,EAAE,UAA2B,EAA3B,gDAA0F,CAAC;AAEhJ,IAAI,MAAM,IAAI,MAAM,EAAE;IAClB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CACtC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.sourcemap.txt index 99d2e65cfe720..6cf78caf44ad8 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.sourcemap.txt @@ -183,8 +183,8 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPatternD 14> , 15> secondarySkillA = "noSkill" 16> -17> secondarySkillA = "noSkill" -18> ] = ["noSkill", "noSkill"]] = multiRobotA; +17> secondarySkillA = "noSkill"] = ["noSkill", "noSkill"] +18> ] = multiRobotA; 1->Emitted(5, 1) Source(10, 6) + SourceIndex(0) 2 >Emitted(5, 5) Source(10, 6) + SourceIndex(0) 3 >Emitted(5, 24) Source(10, 23) + SourceIndex(0) @@ -201,7 +201,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPatternD 14>Emitted(5, 197) Source(10, 53) + SourceIndex(0) 15>Emitted(5, 207) Source(10, 80) + SourceIndex(0) 16>Emitted(5, 209) Source(10, 53) + SourceIndex(0) -17>Emitted(5, 257) Source(10, 80) + SourceIndex(0) +17>Emitted(5, 257) Source(10, 106) + SourceIndex(0) 18>Emitted(5, 258) Source(10, 122) + SourceIndex(0) --- >>>var _h = ["roomba", ["vaccum", "mopping"]][0], nameMC = _h === void 0 ? "noName" : _h; @@ -267,8 +267,8 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPatternD 16> , 17> secondarySkillC = "noSkill" 18> -19> secondarySkillC = "noSkill" -20> ] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]]; +19> secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]] +20> ; 1->Emitted(7, 1) Source(13, 5) + SourceIndex(0) 2 >Emitted(7, 5) Source(13, 5) + SourceIndex(0) 3 >Emitted(7, 43) Source(13, 144) + SourceIndex(0) @@ -287,7 +287,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementArrayBindingPatternD 16>Emitted(7, 220) Source(13, 54) + SourceIndex(0) 17>Emitted(7, 230) Source(13, 81) + SourceIndex(0) 18>Emitted(7, 232) Source(13, 54) + SourceIndex(0) -19>Emitted(7, 280) Source(13, 81) + SourceIndex(0) +19>Emitted(7, 280) Source(13, 144) + SourceIndex(0) 20>Emitted(7, 281) Source(13, 145) + SourceIndex(0) --- >>>if (nameMB == nameMA) { diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.js.map index 4c0852ad1d21e..5ce5dc6ff5465 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringVariableStatementDefaultValues.js.map] -{"version":3,"file":"sourceMapValidationDestructuringVariableStatementDefaultValues.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementDefaultValues.ts"],"names":[],"mappings":"AAOA,IAAI,KAAK,GAAG,OAAO,CAAC;AACpB,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACvD,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AACrD,IAAA,gBAAwB,EAAxB,uCAAwB,CAAY;AACpC,IAAA,gBAAwB,EAAxB,uCAAwB,EAAE,iBAAoC,EAApC,kDAAoC,CAAY;AAC5E,IAAA,8CAA8G,EAA5G,YAAwB,EAAxB,uCAAwB,EAAE,aAAoC,EAApC,kDAAoC,CAA+C;AACnH,IAAI,KAAK,IAAI,KAAK,EAAE;IAChB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;CACvB;KACI;IACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementDefaultValues.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementDefaultValues.ts"],"names":[],"mappings":"AAOA,IAAI,KAAK,GAAG,OAAO,CAAC;AACpB,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACvD,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AACrD,IAAA,gBAAwB,EAAxB,uCAAwB,CAAY;AACpC,IAAA,gBAAwB,EAAxB,uCAAwB,EAAE,iBAAoC,EAApC,kDAAoC,CAAY;AAC5E,IAAA,8CAA8G,EAA5G,YAAwB,EAAxB,uCAAwB,EAAE,aAAoC,EAApC,kDAAkF,CAAC;AACnH,IAAI,KAAK,IAAI,KAAK,EAAE;IAChB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;CACvB;KACI;IACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.sourcemap.txt index c426313b33c52..fe0843d56a9b3 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementDefaultValues.sourcemap.txt @@ -208,8 +208,8 @@ sourceFile:sourceMapValidationDestructuringVariableStatementDefaultValues.ts 8 > , 9 > skill: skillC = "" 10> -11> skill: skillC = "" -12> } = { name: "Edger", skill: "cutting edges" }; +11> skill: skillC = "" } = { name: "Edger", skill: "cutting edges" } +12> ; 1->Emitted(6, 1) Source(13, 5) + SourceIndex(0) 2 >Emitted(6, 5) Source(13, 5) + SourceIndex(0) 3 >Emitted(6, 51) Source(13, 115) + SourceIndex(0) @@ -220,7 +220,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementDefaultValues.ts 8 >Emitted(6, 108) Source(13, 33) + SourceIndex(0) 9 >Emitted(6, 121) Source(13, 69) + SourceIndex(0) 10>Emitted(6, 123) Source(13, 33) + SourceIndex(0) -11>Emitted(6, 173) Source(13, 69) + SourceIndex(0) +11>Emitted(6, 173) Source(13, 115) + SourceIndex(0) 12>Emitted(6, 174) Source(13, 116) + SourceIndex(0) --- >>>if (nameA == nameB) { diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map index ed0fe05cb3ce0..6294c6af22b63 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map] -{"version":3,"file":"sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts"],"names":[],"mappings":"AAUA,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACxF,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC;AAExF,IAAA,kBAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,CAAc;AAChE,IAAA,mBAAW,EAAE,kBAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,CAAc;AAC/E,IAAA,mFAAsJ,EAApJ,eAAW,EAAE,cAAoD,EAA1C,qBAAiB,EAAE,yBAAqB,CAAsF;AAE3J,IAAI,KAAK,IAAI,KAAK,EAAE;IAChB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;KACI;IACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.ts"],"names":[],"mappings":"AAUA,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACxF,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC;AAExF,IAAA,kBAAoD,EAA1C,qBAAiB,EAAE,yBAAuB,CAAY;AAChE,IAAA,mBAAW,EAAE,kBAAoD,EAA1C,qBAAiB,EAAE,yBAAuB,CAAY;AAC/E,IAAA,mFAAsJ,EAApJ,eAAW,EAAE,cAAoD,EAA1C,qBAAiB,EAAE,yBAA0G,CAAC;AAE3J,IAAI,KAAK,IAAI,KAAK,EAAE;IAChB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;KACI;IACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt index 1779c517c68cc..0e8c1c437a2b6 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt @@ -174,15 +174,15 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP 4 > 5 > primary: primaryA 6 > , -7 > secondary: secondaryA -8 > } } = robotA; +7 > secondary: secondaryA } +8 > } = robotA; 1 >Emitted(3, 1) Source(14, 7) + SourceIndex(0) 2 >Emitted(3, 5) Source(14, 7) + SourceIndex(0) 3 >Emitted(3, 23) Source(14, 59) + SourceIndex(0) 4 >Emitted(3, 25) Source(14, 17) + SourceIndex(0) 5 >Emitted(3, 46) Source(14, 34) + SourceIndex(0) 6 >Emitted(3, 48) Source(14, 36) + SourceIndex(0) -7 >Emitted(3, 73) Source(14, 57) + SourceIndex(0) +7 >Emitted(3, 73) Source(14, 59) + SourceIndex(0) 8 >Emitted(3, 74) Source(14, 71) + SourceIndex(0) --- >>>var nameB = robotB.name, _b = robotB.skills, primaryB = _b.primary, secondaryB = _b.secondary; @@ -206,8 +206,8 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP 6 > 7 > primary: primaryB 8 > , -9 > secondary: secondaryB -10> } } = robotB; +9 > secondary: secondaryB } +10> } = robotB; 1->Emitted(4, 1) Source(15, 7) + SourceIndex(0) 2 >Emitted(4, 5) Source(15, 7) + SourceIndex(0) 3 >Emitted(4, 24) Source(15, 18) + SourceIndex(0) @@ -216,7 +216,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP 6 >Emitted(4, 46) Source(15, 30) + SourceIndex(0) 7 >Emitted(4, 67) Source(15, 47) + SourceIndex(0) 8 >Emitted(4, 69) Source(15, 49) + SourceIndex(0) -9 >Emitted(4, 94) Source(15, 70) + SourceIndex(0) +9 >Emitted(4, 94) Source(15, 72) + SourceIndex(0) 10>Emitted(4, 95) Source(15, 84) + SourceIndex(0) --- >>>var _c = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }, nameC = _c.name, _d = _c.skills, primaryB = _d.primary, secondaryB = _d.secondary; @@ -243,8 +243,8 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP 8 > 9 > primary: primaryB 10> , -11> secondary: secondaryB -12> } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; +11> secondary: secondaryB } } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } +12> ; 1->Emitted(5, 1) Source(16, 5) + SourceIndex(0) 2 >Emitted(5, 5) Source(16, 5) + SourceIndex(0) 3 >Emitted(5, 88) Source(16, 155) + SourceIndex(0) @@ -255,7 +255,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP 8 >Emitted(5, 123) Source(16, 30) + SourceIndex(0) 9 >Emitted(5, 144) Source(16, 47) + SourceIndex(0) 10>Emitted(5, 146) Source(16, 49) + SourceIndex(0) -11>Emitted(5, 171) Source(16, 70) + SourceIndex(0) +11>Emitted(5, 171) Source(16, 155) + SourceIndex(0) 12>Emitted(5, 172) Source(16, 156) + SourceIndex(0) --- >>>if (nameB == nameB) { diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js.map index 73e04a6e43389..d718d679cd78c 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js.map] -{"version":3,"file":"sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts"],"names":[],"mappings":"AAUA,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACxF,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC;AAG1F,IAAA,kBAGgD,EAHhD,sEAGgD,EAF5C,eAA6B,EAA7B,yCAA6B,EAC7B,iBAAiC,EAAjC,2CAAiC,CAE9B;AAEP,IAAA,gBAA+B,EAA/B,8CAA+B,EAC/B,kBAGgD,EAHhD,sEAGgD,EAF5C,eAA6B,EAA7B,yCAA6B,EAC7B,iBAAiC,EAAjC,2CAAiC,CAE9B;AACP,IAAA,mFAMqF,EALrF,YAA+B,EAA/B,8CAA+B,EAC/B,cAGgD,EAHhD,sEAGgD,EAF5C,eAA6B,EAA7B,yCAA6B,EAC7B,iBAAiC,EAAjC,2CAAiC,CAEiD;AAE1F,IAAI,KAAK,IAAI,KAAK,EAAE;IAChB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;KACI;IACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.ts"],"names":[],"mappings":"AAUA,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;AACxF,IAAI,MAAM,GAAU,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC;AAG1F,IAAA,kBAGgD,EAHhD,sEAGgD,EAF5C,eAA6B,EAA7B,yCAA6B,EAC7B,iBAAiC,EAAjC,2CAC4C,CACzC;AAEP,IAAA,gBAA+B,EAA/B,8CAA+B,EAC/B,kBAGgD,EAHhD,sEAGgD,EAF5C,eAA6B,EAA7B,yCAA6B,EAC7B,iBAAiC,EAAjC,2CAC4C,CACzC;AACP,IAAA,mFAMqF,EALrF,YAA+B,EAA/B,8CAA+B,EAC/B,cAGgD,EAHhD,sEAGgD,EAF5C,eAA6B,EAA7B,yCAA6B,EAC7B,iBAAiC,EAAjC,2CAEiF,CAAC;AAE1F,IAAI,KAAK,IAAI,KAAK,EAAE;IAChB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB;KACI;IACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACtB"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.sourcemap.txt index 1051abf21b615..6b119b8d22296 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.sourcemap.txt @@ -195,9 +195,9 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP > 11> secondary: secondaryA = "noSkill" 12> -13> secondary: secondaryA = "noSkill" +13> secondary: secondaryA = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } 14> - > } = { primary: "noSkill", secondary: "noSkill" } > } = robotA; 1->Emitted(3, 1) Source(15, 5) + SourceIndex(0) 2 >Emitted(3, 5) Source(15, 5) + SourceIndex(0) @@ -211,7 +211,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP 10>Emitted(3, 157) Source(17, 9) + SourceIndex(0) 11>Emitted(3, 174) Source(17, 42) + SourceIndex(0) 12>Emitted(3, 176) Source(17, 9) + SourceIndex(0) -13>Emitted(3, 219) Source(17, 42) + SourceIndex(0) +13>Emitted(3, 219) Source(18, 53) + SourceIndex(0) 14>Emitted(3, 220) Source(19, 12) + SourceIndex(0) --- >>>var _e = robotB.name, nameB = _e === void 0 ? "noNameSpecified" : _e, _f = robotB.skills, _g = _f === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _f, _h = _g.primary, primaryB = _h === void 0 ? "noSkill" : _h, _j = _g.secondary, secondaryB = _j === void 0 ? "noSkill" : _j; @@ -260,9 +260,9 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP > 15> secondary: secondaryB = "noSkill" 16> -17> secondary: secondaryB = "noSkill" +17> secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } 18> - > } = { primary: "noSkill", secondary: "noSkill" } > } = robotB; 1->Emitted(4, 1) Source(21, 5) + SourceIndex(0) 2 >Emitted(4, 5) Source(21, 5) + SourceIndex(0) @@ -280,7 +280,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP 14>Emitted(4, 223) Source(24, 9) + SourceIndex(0) 15>Emitted(4, 240) Source(24, 42) + SourceIndex(0) 16>Emitted(4, 242) Source(24, 9) + SourceIndex(0) -17>Emitted(4, 285) Source(24, 42) + SourceIndex(0) +17>Emitted(4, 285) Source(25, 53) + SourceIndex(0) 18>Emitted(4, 286) Source(26, 12) + SourceIndex(0) --- >>>var _k = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }, _l = _k.name, nameC = _l === void 0 ? "noNameSpecified" : _l, _m = _k.skills, _o = _m === void 0 ? { primary: "noSkill", secondary: "noSkill" } : _m, _p = _o.primary, primaryB = _p === void 0 ? "noSkill" : _p, _q = _o.secondary, secondaryB = _q === void 0 ? "noSkill" : _q; @@ -337,10 +337,10 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP > 17> secondary: secondaryB = "noSkill" 18> -19> secondary: secondaryB = "noSkill" -20> - > } = { primary: "noSkill", secondary: "noSkill" } - > } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } }; +19> secondary: secondaryB = "noSkill" + > } = { primary: "noSkill", secondary: "noSkill" } + > } = { name: "Edger", skills: { primary: "edging", secondary: "branch trimming" } } +20> ; 1->Emitted(5, 1) Source(27, 5) + SourceIndex(0) 2 >Emitted(5, 5) Source(27, 5) + SourceIndex(0) 3 >Emitted(5, 88) Source(33, 90) + SourceIndex(0) @@ -359,7 +359,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementNestedObjectBindingP 16>Emitted(5, 300) Source(31, 9) + SourceIndex(0) 17>Emitted(5, 317) Source(31, 42) + SourceIndex(0) 18>Emitted(5, 319) Source(31, 9) + SourceIndex(0) -19>Emitted(5, 362) Source(31, 42) + SourceIndex(0) +19>Emitted(5, 362) Source(33, 90) + SourceIndex(0) 20>Emitted(5, 363) Source(33, 91) + SourceIndex(0) --- >>>if (nameB == nameB) { diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map index eb36a3b9022d0..b7086032ef003 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map] -{"version":3,"file":"sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts"],"names":[],"mappings":"AAAK,IAAA,eAAC,CAAc;AAChB,IAAA,qBAA2B,EAAzB,QAAC,EAAE,QAAC,CAAsB"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.ts"],"names":[],"mappings":"AAAK,IAAA,eAAC,CAAc;AAChB,IAAA,qBAA2B,EAAzB,QAAC,EAAE,QAAsB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.sourcemap.txt index 2390f91a8b126..d3d28db40171b 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.sourcemap.txt @@ -40,15 +40,15 @@ sourceFile:sourceMapValidationDestructuringVariableStatementObjectBindingPattern 4 > 5 > a 6 > , -7 > b -8 > } = { a: 30, b: 40 }; +7 > b } = { a: 30, b: 40 } +8 > ; 1->Emitted(2, 1) Source(2, 5) + SourceIndex(0) 2 >Emitted(2, 5) Source(2, 5) + SourceIndex(0) 3 >Emitted(2, 26) Source(2, 32) + SourceIndex(0) 4 >Emitted(2, 28) Source(2, 7) + SourceIndex(0) 5 >Emitted(2, 36) Source(2, 8) + SourceIndex(0) 6 >Emitted(2, 38) Source(2, 10) + SourceIndex(0) -7 >Emitted(2, 46) Source(2, 11) + SourceIndex(0) +7 >Emitted(2, 46) Source(2, 32) + SourceIndex(0) 8 >Emitted(2, 47) Source(2, 33) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map index 2b6cd16157df3..261e0ec708ea8 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map] -{"version":3,"file":"sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts"],"names":[],"mappings":"AAAI,IAAA,uBACwB,EADvB,SAAO,EAAP,4BAAO,EACP,QAAC,CAAuB"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js","sourceRoot":"","sources":["sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.ts"],"names":[],"mappings":"AAAI,IAAA,uBACwB,EADvB,SAAO,EAAP,4BAAO,EACP,QAAuB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.sourcemap.txt index 68d24cb1b32bf..064a9f6fe580c 100644 --- a/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.sourcemap.txt @@ -30,8 +30,8 @@ sourceFile:sourceMapValidationDestructuringVariableStatementObjectBindingPattern 7 > x = 500 8 > , > -9 > y -10> } = { x: 20, y: "hi" }; +9 > y} = { x: 20, y: "hi" } +10> ; 1 >Emitted(1, 1) Source(1, 5) + SourceIndex(0) 2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) 3 >Emitted(1, 28) Source(2, 29) + SourceIndex(0) @@ -40,7 +40,7 @@ sourceFile:sourceMapValidationDestructuringVariableStatementObjectBindingPattern 6 >Emitted(1, 41) Source(1, 6) + SourceIndex(0) 7 >Emitted(1, 69) Source(1, 13) + SourceIndex(0) 8 >Emitted(1, 71) Source(2, 6) + SourceIndex(0) -9 >Emitted(1, 79) Source(2, 7) + SourceIndex(0) +9 >Emitted(1, 79) Source(2, 29) + SourceIndex(0) 10>Emitted(1, 80) Source(2, 30) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map \ No newline at end of file From 248a0ae52b56bba8da255049154bd3c2b1f756e0 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Fri, 15 Jun 2018 17:56:36 -0700 Subject: [PATCH 5/5] Update API (#24966) --- tests/baselines/reference/api/tsserverlibrary.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index a9fe9a32556dc..d9cfca6dabc7e 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -6495,7 +6495,7 @@ declare namespace ts { * @param pos The start position. * @param end The end position. */ - function createRange(pos: number, end: number): TextRange; + function createRange(pos: number, end?: number): TextRange; /** * Creates a new TextRange from a provided range with a new end position. * @@ -6603,7 +6603,6 @@ declare namespace ts { function textSpanIntersectsWithPosition(span: TextSpan, position: number): boolean; function textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan | undefined; function createTextSpan(start: number, length: number): TextSpan; - function createTextRange(pos: number, end?: number): TextRange; function createTextSpanFromBounds(start: number, end: number): TextSpan; function textChangeRangeNewSpan(range: TextChangeRange): TextSpan; function textChangeRangeIsUnchanged(range: TextChangeRange): boolean;